我有以下scss:
@mixin logo($size:mobile) {
@if $size == mobile {
#logo {
@extend %logoMobile;
a {
@extend %logoMobile;
}
}
}
@else {
#logo {
@extend %logoDesktop;
a {
@extend %logoDesktop;
}
}
}
}
%fullWidth {
width: 100%;
}
%logoMobile {
@extend %fullWidth;
height: 30px;
}
%logoDesktop {
width: 211px;
height: 35px;
}
#header {
@include logo('mobile');
}
@media only screen and (min-width: 768px) {
#header {
@include logo('desktop');
}
}
生成的css输出为:
#header #logo, #header #logo a {
width: 100%;
}
#header #logo, #header #logo a {
height: 30px;
}
知道为什么不生成@media 查询吗?