0
我之前使用过sass插值,而且我不能为我的生活弄清楚为什么目标数据属性不能编译。它必须与引号相关...我尝试了双倍,单个,添加@charset'UTF-8';到app.scss(这是一个长镜头)。SCSS插值不起作用
有什么想法?我敢打赌这是愚蠢的。请注意,class .test如何通过罚款。
@mixin grid-column {
@media #{$small-up} {
@for $i from 1 through $column-count {
.test { width: #{$i}; }
&[data-small="#{$i}"] { width: grid-calc($i, $column-count); }
}
}
@media #{$medium-up} {
@for $i from 1 through $column-count {
&[data-medium="#{$i}"] { width: grid-calc($i, $column-count); }
}
}
@media #{$large-up} {
@for $i from 1 through $column-count {
&[data-large='#{$i}'] { width: grid-calc($i, $column-count); }
}
}
}
编译为:
.row .column .test {
width: 1; }
.row .column[data-small="#{$i}"] {
width: 8.33333%; }