官方文檔
The @each directive can also use multiple variables, as in @each $var1, $var2, ... in . If is a list of lists, each element of the sub-lists is assigned to the respective variable.
Since maps are treated as lists of pairs, multiple assignment works with them as well.
The @each directive can also use multiple variables, as in @each $var1, $var2, ... in . If is a list of lists, each element of the sub-lists is assigned to the respective variable.
Since maps are treated as lists of pairs, multiple assignment works with them as well.
2017-12-31
$bgcolor: #c40712;
$bg:lightness($bgcolor);
.btn {
background-color: $bgcolor;
border-color: lighten($bgcolor,$bg - $bg * 0.1);
}
$bg:lightness($bgcolor);
.btn {
background-color: $bgcolor;
border-color: lighten($bgcolor,$bg - $bg * 0.1);
}
2017-12-26
直接寫在最外層的同學,那樣你的代碼就會丑···本來按照bem規范的要求你可以一級嵌套一級,結果css表又變成了一大坨亂的,這樣之后會不好維護,尤其是在項目大的時候經常需要維護上百份樣式表
2017-11-18
$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 ) );
.btn-default {
color: map-get( map-get($theme-color,default),bgcolor);
}
.btn-default {
color: map-get( map-get($theme-color,default),bgcolor);
}
2017-10-31
@mixin swatchesColor($color){
@for $i from 1 through 21{
li:nth-child(#{$i}){
$bgc:if($i<=11,lighten($color,55-$i*5), darken($color,$i*5-55 ));
background-color:$bgc;
&:hover:before{content:"#{$bgc}";color:lighten($bgc,40);
font-family:verdana;font-size:8px;padding:2px;
}}}}
@for $i from 1 through 21{
li:nth-child(#{$i}){
$bgc:if($i<=11,lighten($color,55-$i*5), darken($color,$i*5-55 ));
background-color:$bgc;
&:hover:before{content:"#{$bgc}";color:lighten($bgc,40);
font-family:verdana;font-size:8px;padding:2px;
}}}}
2017-10-19
最新回答 / mop18mop183811015
檢查一下compass的版本,控制臺敲入 compass -v ,確保最新版本。1.03版本正常!G:\study\myexample\compass_study\learn-01>compass interactive>> rgb(200,40,88)#c82858
2017-10-16