sindresorhus / grunt-sass

Compile Sass to CSS
MIT License
1.01k stars 209 forks source link

Incompatible units: 'px' and 'em' #233

Closed mildfuzz closed 9 years ago

mildfuzz commented 9 years ago

Running into this error:

Incompatible units: 'px' and 'em'

when running:

@function pxem($pixel-size, $current-pixel-size:$base-pixel-fontsize){
    @if unit($pixel-size) != "" {
        $pixel-size: ($pixel-size / 1px);
    }

    @if unit($current-pixel-size) != "" {
        $current-pixel-size: ($current-pixel-size / 1px);
    }

    @return (1em * ($pixel-size / $current-pixel-size));
}
xzyfer commented 9 years ago

What values are you passing into this function?

arthurvr commented 9 years ago

This task just passes the options to node-sass. Likely a node-sass/libsass problem instead of a bug in this task.