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 reply

how 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

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -