
內容簡介
CSS 可以做很多事情,但有些功能是開發人員需要的,例如變數、常數和更快速的語法。一般 CSS 並沒有這些功能,所以有了預處理器,例如 CSS Crush。
CSS Crush for WordPress 允許在 CSS 檔案中使用變數。
此外,這個外掛會自動為你的主題樣式表處理所有的事情!不需要進行配置,但可以從設定頁面進行自定義。
預設情況下,你的樣式表會被壓縮、緩存並自動生成供應商前綴。
以下是自動生成前綴的示例
/* Before */
div { background: red linear-gradient( left, red, white ); }
/* After */
div {
background: red -webkit-linear-gradient( left, red, white );
background: red -moz-linear-gradient( left, red, white );
background: red -o-linear-gradient( left, red, white );
background: red linear-gradient( left, red, white );
}
以下是使用變數的示例
/* 定義變數 */
@define {
brand-blue: #C1D9F5;
helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
ul, p {
font-family: $( helvetica );
color: $( brand-blue );
}
更多功能
在 CSS 中聲明變數
直接使用 @import
內建一些自定義數學函數
區塊巢狀
支援 :any 偽類
CSS Crush 的當前版本為 1.6.1
欲了解更多功能,請造訪http://the-echoplex.net/csscrush/。
相關連結:
http://www.codepress.nl/plugins/
翻譯
如果你想貢獻翻譯,請發送至 [email protected]。
外掛標籤
開發者團隊
原文外掛簡介
CSS allows you to do lots of things, but some features are missing to developers. What about variables, constants, and general faster syntax? Normal CSS can not do that, that is why you have preprocessors, like CSS Crush.
CSS Crush for WordPress allows the use of variables in CSS files.
This plugin will automaticly process all your theme’s stylesheets for you! No configuration needed. However, you can customize it from the Settings page.
By default your stylesheet will be minified, cached and have it’s vendor prefixes automatically generated.
examples of generated prefixes
/* Before */
div { background: red linear-gradient( left, red, white ); }
/* After */
div {
background: red -webkit-linear-gradient( left, red, white );
background: red -moz-linear-gradient( left, red, white );
background: red -o-linear-gradient( left, red, white );
background: red linear-gradient( left, red, white );
}
example with the use of variables
/* Defining variables */
@define {
brand-blue: #C1D9F5;
helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
ul, p {
font-family: $( helvetica );
color: $( brand-blue );
}
More Features
Declare variables in your CSS
Direct @import
A small collection of custom math functions are built-in
Block nesting
The experimental :any pseudo class is supported
Current CSS Crush version: 1.6.1
For a full list of features please visit http://the-echoplex.net/csscrush/.
Related Links:
http://www.codepress.nl/plugins/
Translations
If you like to contribute a language, please send them to [email protected].
