Open saadeghi opened 2 years ago
+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>
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
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