-
-
Notifications
You must be signed in to change notification settings - Fork 75
I'm using Astro. Being able to use importFrom
was a big deal. What is the workaround besides not upgrading to postcss-preset-env v8?
#834
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
Comments
@romainmenke while that was always possible, and it won't throw any errors, the media queries in that file aren't being applied. Maybe because I'm using custom media queries like From my understanding those custom media queries needed to be loaded by postcss beforehand which is why |
There is a bug in whatever build/bundle tool you are using if they are not applied when using Our concern is what happens when Removing For global styles that need to be known to component styles we are considering creating a new plugin :
|
@romainmenke Thanks for the clarity. Much appreciated. |
Ran into this same issue and eventually came across https://www.npmjs.com/package/postcss-inject. It hasn't been updated in a few years, but seems to work perfectly in my limited testing. |
@mdmoreau We don't advice using that plugin. It is indeed very outdated. |
@romainmenke yeah fair enough - was looking for something to handle custom selectors as well unfortunately. |
Hello, using svelte and having the same issue. I tried using |
@mantismamita the only workaround for now is to import |
That's what I was afraid of 😢 |
@mantismamita Global data is not that far now ^ |
* Creating new Plugin #834 * Clarifying doc * Linting * Update plugins/postcss-global-data/src/index.ts Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com> * Simpler tests * Update plugins/postcss-global-data/docs/README.md Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com> * remove unused examples * adding some keywords * linting * regenerating docs * examples are not mandatory --------- Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
@mdmoreau @mantismamita @djmtype you should now be able to use https://www.npmjs.com/package/@csstools/postcss-global-data, we'd love to know how it goes. The instruction is to just put the plugin first and pass an array of files that you wish to be providing data |
@Antonio-Laguna Thanks! So far so good. |
@Antonio-Laguna no problems so far. I've got it working on a package using svelte and Storybook. |
Thanks both a lot for confirming! This is so helpful! Closing this issue as completed! |
@Antonio-Laguna working great - thanks so much! |
My postcss config:
Originally posted by @djmtype in #822 (comment)
The text was updated successfully, but these errors were encountered: