eduardoboucas / include-media

📐 Simple, elegant and maintainable media queries in Sass
https://eduardoboucas.github.io/include-media/
MIT License
2.57k stars 191 forks source link

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

Closed axelBrauneder closed 2 years ago

axelBrauneder commented 4 years ago

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?

jackmcpickle commented 4 years ago

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

KittyGiraudel commented 4 years ago

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

cmoleka commented 4 years ago

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

khashashin commented 4 years ago

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