-
換皮膚的項目,可能每一套皮膚對應的顏色蠻多的,那么使用此功能來管理顏色的變量就非常的有條理性,便于維護與管理。你可以這樣使用:
$theme-color:?( ????default:?( ????????bgcolor:?#fff, ????????text-color:?#444, ????????link-color:?#39f ????), ????primary:( ????????bgcolor:?#000, ????????text-color:#fff, ????????link-color:?#93f ????), ????negative:?( ????????bgcolor:?#f36, ????????text-color:?#fefefe, ????????link-color:?#d4e ????) );
查看全部 -
多層嵌套取值
$theme-color: (
? ? default: (
? ? ? ? bgcolor: #fff,
? ? ? ? text-color: #444,
? ? ? ? link-color: #39f
? ? ),
? ? primary:(
? ? ? ? bgcolor: #000,
? ? ? ? text-color:#fff,
? ? ? ? link-color: #93f
? ? ),
? ? negative: (
? ? ? ? bgcolor: #f36,
? ? ? ? text-color: #fefefe,
? ? ? ? link-color: #d4e
? ? )
);
.test1 {
? ? color:map-get(map-get($theme-color,default),text-color);
}
查看全部 -
If a?
@media
?directive appears within a CSS rule, it will be bubbled up to the top level of the stylesheet, putting all the selectors on the way inside the rule.查看全部 -
unit() 函數主要是用來獲取一個值所使用的單位,碰到復雜的計算時,其能根據運算得到一個“多單位組合”的值,不過只充許乘、除運算:
查看全部 -
升級后不會報錯了?
查看全部 -
數字函數-random()函數
括號內不帶參數
查看全部 -
同時 quote() 碰到特殊符號,比如:?!、?、>?等,除中折號?-?和?下劃線_?都需要使用雙引號括起,否則編譯器在進行編譯的時候同樣會報錯:
查看全部 -
使用 quote() 函數只能給字符串增加雙引號,而且字符串中間有單引號或者空格時,需要用單引號或雙引號括起,否則編譯的時候將會報錯。
.test1?{ ????content:??quote(Hello?Sass); }
查看全部 -
如果字符串,自身帶有引號會統一換成雙引號 ""。
查看全部 -
unquote( ) 函數只能刪除字符串最前和最后的引號(雙引號或單引號),而無法刪除字符串中間的引號。如果字符沒有帶引號,返回的將是字符串本身。
查看全部 -
the characters of sass:
define variables;
@extend?
%placeholder
mixins
what is the functions of sass?
string function
number function?
list funtion?
color function?
introspection function
ternary function
查看全部 -
@each 循環就是去遍歷一個列表,然后從列表中取出對應的值。
@each 循環指令的形式:
@each?$var?in?<list>
.author-bio{
@include author-images;
}? ? //sass
.author-bio .photo-adam{
}
查看全部 -
在 Sass 的 @for 循環中有兩種方式:
@for?$i?from?<start>?through?<end> @for?$i?from?<start>?to?<end>
$i 表示變量
start 表示起始值
end 表示結束值
這兩個的區別是關鍵字 through 表示包括?end 這個數,而 to 則不包括?end 這個數。
查看全部 -
@debug :如果你在命令行中使用命令生成css文件,命令行中就會打印debug的信息
@if? {
}else {
}
查看全部 -
@import color.css 自動編譯成css
@import "color,css" 則不把它編譯成css
查看全部
舉報