Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue importing normalizer in SCSS #546

Closed
jalberto opened this issue Feb 5, 2025 · 5 comments
Closed

Issue importing normalizer in SCSS #546

jalberto opened this issue Feb 5, 2025 · 5 comments

Comments

@jalberto
Copy link

jalberto commented Feb 5, 2025

Doing @use open-props/normalize get me this crash:

../../../open-props/normalize.min.css 1:636  @use
  ../../../../src/styles/main.scss 1:1         root stylesheet
  Stack trace:
    at handleCompileResponse (/home/astro/node_modules/sass-embedded/dist/lib/src/compiler/utils.js:155:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    [...] See full stack trace in the browser, or rerun with --verbose.
12:58:03 [ERROR] [sass] Error: This function isn't allowed in plain CSS.

The mention position (636) is:

...@media (dynamic-range:high) or (color-gamut:p3){@supports (color:color(display-p3 0 0 0))...
                                                                    ^

If I manually remove the whole @media rule it works as expected

@argyleink
Copy link
Owner

looks like their parser is out of date, that's a valid and meaningful media query it's dying on. but should move upstream to @use maybe?

@jalberto
Copy link
Author

jalberto commented Feb 5, 2025

This is using the latest astrojs (5.2.5) with its included sass support ("sass-embedded": "^1.82.0") so I guess it will fail for more people.

I will report upstream, I guess the only workaround will be to downgrade open props for now

edit: seems already reported: sass/embedded-host-node#170

Also interesting: sass/sass#2831 (comment)

@argyleink
Copy link
Owner

sorry the normalize has that query to conditionally upgrade link colors to p3 and it's blocking your progress, that stinks!

@jalberto
Copy link
Author

jalberto commented Feb 6, 2025

@argyleink no big deal, still love open-props, thanks for your help!

Do you prefer me to close this, or to keep it open for tracking?

@argyleink
Copy link
Owner

let's close it, not something we can fix here, but we can leave the history so anyone else can catch up 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants