@each $social-type,$social-color in $social-colors{
.btn-#{$social-type}{
color: map-get($social-colors,$social-type);
}
}
.btn-#{$social-type}{
color: map-get($social-colors,$social-type);
}
}
2018-01-27
官方文档
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