2016-06-07 57 views
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/進行測試。 在此先感謝!

回答