我如何编写此代码,以便检查$ text-shadows和$ shadows的真实性?
.btn {
@if $text-shadows {
@include text-shadow-black;
}
@if $shadows {
@include shadow-white;
}
}
要清楚,我想要实现的是没有嵌套:
.btn {
@if $text-shadows {
@if $shadows {
@include text-shadow-black;
}
}
}
答案 0 :(得分:2)
您正在寻找and
关键字:
.btn {
@if $text-shadows and $shadows {
@include text-shadow-black;
}
}