We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
:where
Describe the bug When I add a PostCSS preprocessor to svletekit, below CSS code doesn't work anymore:
<style global> .btn:where(.btn-primary,.btn-secondary){ background-color: green; } </style>
To Reproduce
npm install
npm run dev
Expected behavior
Expected CSS:
.btn:where(.btn-primary,.btn-secondary){ background-color: green; }
generated CSS:
.btn:where(.btn-primary),:global(.btn-secondary){ background-color:green }
Information about your project: https://github.com/saadeghi/svelte-preprocess-postcss-bug
The text was updated successfully, but these errors were encountered:
+1.
This actually causes problems more often than one might think since popular packages like the-new-css-reset use :where.
Minimal repro for such cases is:
<style lang="sass" global> @use 'the-new-css-reset/css/reset' </style>
Sorry, something went wrong.
The bug is located in this function: https://github.com/sveltejs/svelte-preprocess/blob/main/src/modules/globalifySelector.ts#L11
The Regex does not account for more modern :where, :not and :ìs selectors
Regex
:not
:ìs
No branches or pull requests
Describe the bug
When I add a PostCSS preprocessor to svletekit, below CSS code doesn't work anymore:
To Reproduce
npm install
npm run dev
npm run dev
again to see expected styleExpected behavior
Expected CSS:
generated CSS:
Information about your project:
https://github.com/saadeghi/svelte-preprocess-postcss-bug
The text was updated successfully, but these errors were encountered: