-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 BUG: Inline styles in Astro components are not processed with @snowpack/plugin-postcss
#1234
Comments
Hey @jasikpark, I think the reason here is that the snowpack plugin is only used by CSS files that are loaded through snowpack. In this case the styles are completely handled by Astro internally. It does use post-css, just not through the snowpack plugin. That being said, we probably do want to support container queries here. How is it that container queries are working in that example, since it doesn't use post-css plugin? CSS compilation happens here: https://github.com/snowpackjs/astro/blob/0f0cc2b9d83ffeee125b85c95d2d51080f21074d/packages/astro/src/compiler/transform/styles.ts . So if we need to add a post-css plugin that's the place to do it. I'm going to mark this as accepted even though the solution isn't clear to me yet. |
Talked about this on Discord and it sounds like adding this plugin to our internal postcss is the way to go for now, https://discord.com/channels/830184174198718474/845430950191038464/880911997745635388 @jasikpark are you interested in working on this? |
For sure! I suppose I'll also have to check out @FredKSchott's branch that explores going gungho on allowing full postcss integration 馃槅 |
please do! You could probably tackle this and #1279 at the same time! |
Thanks for the report! We believe that this has been fixed in astro v0.21, going out today. Let us know if you can still reproduce the issue after updating to v0.21 and we'll be happy to take a look. |
What package manager are you using?
yarn
What operating system are you using?
Mac
Describe the Bug
While trying to get the container queries polyfill setup with Astro as a PostCSS plugin, I wanted to use container query syntax in the inline style tags, ex:
src/pages/index.astro
Which does not produce the PostCSS processed syntax, while importing the CSS
import "./global.css";
works perfectly fine in @jonathantneal's example.Steps to Reproduce
Compare @jonathantneal's working example:
to my broken fork:
Link to Minimal Reproducible Example (Optional)
https://codesandbox.io/s/github/jasikpark/astro-with-postcss/tree/main/
The text was updated successfully, but these errors were encountered: