Ich möchte die Rasterhöhe mit 2 teilen. Aber es ist nicht auf den erwarteten Wert kompiliert. Stattdessen ist es so kompiliert.SASS Division in @include nicht kompilieren
Das ist mein scss-Code. Ich habe verschiedene Kombinationen ausprobiert. Keine von ihnen hat funktioniert. Bitte zeigen Sie, wo der Fehler liegt.
@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);
}
}
Der kompilierte Css-Code.
@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;
}
}
Ich verwende http://www.sassmeister.com/ zum Testen. Vielen Dank im Voraus!
Danke. Es funktionierte :) –