远离 CSS 的抽象 [英] Abstraction away from CSS

查看:23
本文介绍了远离 CSS 的抽象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多框架都试图从 HTML(自定义标签、JSF 组件系统)中抽象出来,以便更轻松地处理那个特定的鱼缸.

Many frameworks seek to abstract away from HTML (custom tags, JSFs component system) in an effort to make dealing with that particular kettle of fish easier.

你们用过的有没有类似的概念应用于 CSS 的?为你做一堆跨浏览器魔法的东西,支持像变量(为什么每次我想要那种颜色时都必须输入#3c5c8d),支持计算字段(被编译"成 CSS 和 JS)等.

Is there anything you folks have used that has a similar concept applied to CSS? Something that does a bunch of cross-browser magic for you, supports like variables (why do I have to type #3c5c8d every time I want that colour), supports calculated fields (which are 'compiled' into CSS and JS), etc.

或者,我的想法是否正确?我是否试图将一个非常方形的块推过一个非常圆的孔?

Alternatively, am I even thinking about this correctly? Am I trying to push a very square block through a very round hole?

推荐答案

您始终可以使用模板引擎来添加变量计算字段到您的 CSS 文件.

You can always use a template engine to add variables and calculated fields to your CSS files.

这篇关于远离 CSS 的抽象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆