$color: (
text: #f36,
link: #f63,
border: #ddd,
backround: #fff
);
$typo:(
font-size: 12px,
line-height: 1.6,
border: #ccc,
background: #000
);
比如这两个maps,将它们合并在一起后传到一个tag中,比如:
body{
text: #f36,
link: #f63,
font-size: 12px,
line-height: 1.6,
border: #ccc,
background: #000
}
$newMap:map-merge($color, $typo);
body{
@each $Prop,$val in $newMap{
#{$Prop}: #{$val};
}
}
body{@include newMap;}这样行不行