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

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

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