SASS illegal nesting

328 views Asked by At

When compiling a sass file I get this error:

 Illegal nesting: Only properties may be nested beneath properties. on line 4 of src/sass/_vars_and_mixins.sass

The code that is causing the issue is the fourth row

$breakpoints: (mobile: 768px, tablet: 767px, desktop: 1024px, large: 1280px)

@mixin mobile
    @media screen and (max-width: map-get($breakpoints, mobile))
        @content

For some reason the following mixin is not throwing any error.

@mixin tablet
    @media screen and (min-width: map-get($breakpoints, tablet))
        @content

Anybody can spot the difference?

0

There are 0 answers