You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use custom media queries in almost every project. With PostCSS, I would utilize @csstools/postcss-global-data with the following configuration to inject all custom media queries into every file, eliminating the need to import them every time.
In Lightning CSS, I haven't found any alternative for injecting custom CSS into every file as I did with PostCSS. Currently, I have to manually import _media.css into every CSS file. Have I overlooked this feature, or is it not yet possible? I am using Lightning CSS in Vite projects (SvelteKit, Astro).
I would appreciate any feedback or considerations regarding the possibility of adding this as a feature.
Thanks for reading!
The text was updated successfully, but these errors were encountered:
nd55
changed the title
Global style injection in all CSS files
Allowing global style injection into all CSS files
Jan 17, 2024
Thanks for your answer. Astro and Svelte are based on Vite, and unfortunately, vite does not yet support custom resolvers for its Lightning CSS integration. There already is an open issue about that, so I will keep an eye on that :)
Hello there :)
I use custom media queries in almost every project. With PostCSS, I would utilize
@csstools/postcss-global-data
with the following configuration to inject all custom media queries into every file, eliminating the need to import them every time.In Lightning CSS, I haven't found any alternative for injecting custom CSS into every file as I did with PostCSS. Currently, I have to manually import
_media.css
into every CSS file. Have I overlooked this feature, or is it not yet possible? I am using Lightning CSS in Vite projects (SvelteKit, Astro).I would appreciate any feedback or considerations regarding the possibility of adding this as a feature.
Thanks for reading!
The text was updated successfully, but these errors were encountered: