mappy-breakpoints
mappy-breakpoints copied to clipboard
Incompatible units error
Hi!
Im using mappy-breakpoints (v. 0.2.3) like this:
$breakpoints: (
's' : 36em,
'm' : 48em,
'l' : 64em,
);
@include mappy-bp(s m){
//Doing some styles
};
But I get this error:
sass\1-vendor\_mappy-breakpoints.scss
Error: Incompatible units: 'px' and 'em'.
on line 129 of sass/1-vendor/_mappy-breakpoints.scss
>> $_maxw: mappy-convert-to-em($_maxw - 1px);
EDIT:
Got it to work after changing
$_maxw: mappy-convert-to-em($_maxw - 1px);
to
$_maxw: mappy-convert-to-em($_maxw - mappy-em(1px));
Interesting error. Let me get to it when I find some time on my hands.
Encountered the issue again, I made a PR to allow more general units:
https://github.com/zellwk/mappy-breakpoints/pull/28