官方文档
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