eduardoboucas / include-media

📐 Simple, elegant and maintainable media queries in Sass

Home Page:https://eduardoboucas.github.io/include-media/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiling error in IDE's with media(slice($conditions, 2)...) - possible fix

axelBrauneder opened this issue · comments

In the last mixin at the bottom of the file, there is always a compiling error. It seems like that's only the case on most IDE's, not when compiling directly. See image for notice:

include-media-sass-error

This is what seems to be causing the issue:
@include media(slice($conditions, 2)...) { @content; }

So my suggestion would be to change it to the following:
$sliced-conditions: slice($conditions, 2);
@include media($sliced-conditions...) { @content; }

include-media-sass-no-errors

That seems to not be throwing any errors, and I haven't had any issues with it yet. Could that be released in a future update?

Thanks @axelBrauneder - will look at this soon. Or feel free to create a PR. 😺

Out of curiosity, what compiler is your IDE relying on?

node-sass and sass-loader successfully compiled with this suggestion.

I've same behavior. PyCharm shows error: invalid argument. Also changed it as suggested by @axelBrauneder and it works without errors