Skip to content

Incompatible units error #19

Open
Open
@Crustan

Description

@Crustan

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));

Activity

zellwk

zellwk commented on Aug 28, 2017

@zellwk
Owner

Interesting error. Let me get to it when I find some time on my hands.

X-Y

X-Y commented on Jan 2, 2023

@X-Y

Encountered the issue again, I made a PR to allow more general units:

#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @X-Y@zellwk@Crustan

      Issue actions

        Incompatible units error · Issue #19 · zellwk/mappy-breakpoints