css - SASS Combining Variables to Form Unit -
css - SASS Combining Variables to Form Unit -
this question has reply here:
adding unit number in sass 1 replyhow combine 2 variables in sass form single unit? setup follows:
$font-size: 16; $font-unit: px; $base-font-size: {$font-size}{$font-unit} !default; @if unit($base-font-size) != 'px' { @warn "parameter must resolve value in pixel units."; }
this throws compile error: invalid css after ... expected look ... was
thanks help!
try instead:
$font-size: 16; $font-unit: 1px; $base-font-size: $font-size * $font-unit !default; @if unit($base-font-size) != px { @warn "parameter must resolve value in pixel units."; }
css sass
Comments
Post a Comment