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

Error on compiling #222

Closed albi closed 1 year ago

albi commented 1 year ago

With v2.0 I got an error in Codekit (latest on macOS).

Libsass: Error: Invalid CSS after " @if meta": expected expression (e.g. 1px, bold), was ".feature-exists('at" on line 190:11 of Users/albi/Jobs/ Vorlagen/HTML5Boilerplate/node_modules/include-media/dist/_include-media.scss

What kind of error is this?

jackmcpickle commented 1 year ago

HI @albi, Can you post the code you are using it with. Can try and replicate it outside of codekit maybe? maybe via the dart sass package by itself.

Hard for us to check if its working in a paid app.

vaibhavkthakkar commented 1 year ago

I got the same error with 2.0 "Error: Invalid CSS after \" @if meta\": expected expression (e.g. 1px, bold), was \".feature-exists('at\"\n on line 190 of node_modules/include-media/dist/_include-media.scss\n from line 15 of sass/abstracts/_responsive.scss\n from line 23 of sass/style.scss\n>> @if meta.feature-exists('at-error') {\n\n ----------^\n"

I have to move on 1.4.9

albi commented 1 year ago

me too, have to downgrade, as this seems to be an error with v2.0 not with my setup.

jackmcpickle commented 1 year ago

Please make sure you are using the latest sass. libsass, ruby-sass, node-sass (libsass) are all deprecated. You need to use the latest sass package. larger than version 1.23.0 which is when the new @use syntax came in.

if you still have issues then please post the setup (compile tool) you are using and the surrounded in sass code that is causing it to crash.

But if you don't want to upgrade/change your sass package then using include-media@1.4.9 is fine.

jackmcpickle commented 1 year ago

This was noted in https://github.com/eduardoboucas/include-media#20-release - requiring the dart-sass package (or sass - on npm)

albi commented 1 year ago

Thanks, did not see that! Will transfer future projects to dart sass!

vaibhavkthakkar commented 1 year ago

This was noted in https://github.com/eduardoboucas/include-media#20-release - requiring the dart-sass package (or sass - on npm) Thanks, will check that.

jackmcpickle commented 1 year ago

No worries. Glad we got to the bottom of it. 😉