1
我有以下SASS文件奇怪SASS輸出擴展
_android.scss:
$width: 111px;
@import 'child';
.android .child {
@extend %child;
}
_ios.scss:
$width: 999px;
@import 'child';
.ios .child {
@extend %child;
}
_child.scss:
%child {
width: $width;
}
app.scss:
@import 'ios';
@import 'android';
現在,當我運行青菜,我得到:
$> sass app.scss
.ios .child, .android .child {
width: 999px; }
.ios .child, .android .child {
width: 111px; }
不是真的我的預期,這是
.ios .child {
width: 999px;
}
.android .child {
width: 111px;
}
這是什麼什麼,我錯在這裏做什麼?
您想爲此使用mixin,而不是佔位符。 – MMM