0
我想将网格高度除以2.但是,它没有被编译为期望值。相反,它是这样编译的。@include中的SASS分区没有编译
这是我的scss代码。我尝试了不同的组合。他们都没有工作。请指出错误的地方。
@mixin phone-size($width, $height) {
@media screen and (min-height: $height) and (min-width: $width) {
@content;
}
}
@include phone-size(360, 480) {
$img-height: 90px;
$grid-height: #{$img-height * 3 + 6px};
.text-wrapper {
$two: 2px;
bottom: $grid-height/2;
bottom: #{$grid-height/2};
bottom: $grid-height/2px;
bottom: #{$grid-height/(2)};
bottom: $grid-height/$two;
bottom: $grid-height/(2);
bottom: ($grid-height/$two);
}
}
编译后的css代码。
@media screen and (min-height: 480) and (min-width: 360) {
.text-wrapper {
bottom: 276px/2;
bottom: 276px/2;
bottom: 276px/2px;
bottom: 276px/2;
bottom: 276px/2px;
bottom: 276px/2;
bottom: 276px/2px;
}
}
我使用http://www.sassmeister.com/进行测试。 在此先感谢!
谢谢。有效 :) –