CSS allows you to do lots of things, but some features are missing to developers.
CSS允许您做很多事情,但是开发人员缺少某些功能。
What about variables, constants, and general faster syntax?
变量,常量和一般更快的语法呢?
Normal CSS can not do that, that is why you have preprocessors, like CSS Crush.
普通的CSS不能做到这一点,这就是为什么要使用CSS Crush之类的预处理器的原因。 p>
CSS Crush for WordPress allows the use of variables in CSS files.
WordPress的CSS Crush允许在CSS文件中使用变量。 p>
This plugin will automaticly process all your theme’s stylesheets for you!
此插件将自动为您处理您所有主题的样式表!
No configuration needed.
无需配置。
However, you can customize it from the Settings page.
但是,您可以从“设置”页面对其进行自定义。 p>
By default your stylesheet will be minified, cached and have it’s vendor prefixes automatically generated.
默认情况下,您的样式表将被缩小 em>, cached em>并自动生成供应商前缀 em>。 p>examples of generated prefixes
生成的前缀示例 strong> p>/* Before */ / *之前* /div { background: red linear-gradient( left, red, white );
div {背景:红色线性渐变(左,红,白);
}
}
/* After */
/ *在* /之后
div {
div {
background: red -webkit-linear-gradient( left, red, white );
背景:红色-webkit-linear-gradient(左,红,白);
background: red -moz-linear-gradient( left, red, white );
背景:红色-moz-linear-gradient(左侧,红色,白色);
background: red -o-linear-gradient( left, red, white );
背景:红色-o-linear-gradient(左,红,白);
background: red linear-gradient( left, red, white );
背景:红色线性渐变(左,红,白);
}
}
code> pre>
example with the use of variables
使用变量的示例 strong> p>/* Defining variables */ / *定义变量* /@define {
@define {
brand-blue: #C1D9F5;
蓝色:#C1D9F5;
helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
Helvetica:“ Helvetica Neue”,Helvetica,Arial,无衬线;
}
}
ul, p {
ul,p {
font-family: $( helvetica );
字体家族:$(helvetica);
color: $( brand-blue );
颜色:$(brand-blue);
}
}
code> pre>
More Features
更多功能 strong> p>- Declare variables in your CSS
- 在CSS中声明变量 li>
- Direct @import
- 直接@import li>
- A small collection of custom math functions are built-in
- 内置少量自定义数学函数 li>
- Block nesting
- 块嵌套 li>
- The experimental :any pseudo class is supported
- 实验性:支持任何伪类 li>
ul>
Current CSS Crush version: 1.6.1
当前CSS Crush版本:1.6.1 em> p>For a full list of features please visit http://the-echoplex.net/csscrush/
有关功能的完整列表,请访问 http://the-echoplex.net/csscrush/
>.
>。 p>
Related Links:
相关链接: strong> p>- http://www.codepress.nl/plugins/
- http://www.codepress.nl/plugins/ li>
ul>
Translations
翻译 h4>
If you like to contribute a language, please send them to info@codepress.nl.
如果您想贡献一种语言,请将其发送到 info@codepress.nl 。 p>