CSS 預處理器,Less CSS 1.7.5 發布
Less 是一個Css 預編譯器,意思指的是它可以擴展Css語言,添加功能如允許變量(variables),混合(mixins),函數(functions) 和許多其他的技術,讓你的Css更具維護性,主題性,擴展性。
Less 可運行在 Node 環境,瀏覽器環境和Rhino環境.同時也有3種可選工具供你編譯文件和監視任何改變。
例如:
@base: #f938ab; .box-shadow(@style, @c) when (iscolor(@c)) { -webkit-box-shadow: @style @c; box-shadow: @style @c; } .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) { .box-shadow(@style, rgba(0, 0, 0, @alpha)); } .box { color: saturate(@base, 5%); border-color: lighten(@base, 30%); div { .box-shadow(0 0 5px, 30%) } }
編譯后
.box {
color: #fe33ac;
border-color: #fdcdea;} .box div {
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);}
Less CSS 1.7.5 發布了,改進內容包括:
Allow comments in keyframe (complete comment support coming in 2.0)
pass options to parser from less.render
Support /deep/ combinator
handle fragments in data-uri's
float @charsets to the top correctly
updates to some dependencies
Fix interpolated import in media query
A few other various small corrections
</ul>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!