-
-
Notifications
You must be signed in to change notification settings - Fork 75
PostCSS Global Data #841
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
PostCSS Global Data #841
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
Looking at the simplicity I am a bit surprised that no one created exactly this before now. The feature felt really complex to me because it was always entangled in other plugins.
Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still awesome!
Left some final comments :)
Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Fixes #834
This creates a plugin that injects Global Data into the CSS. The plugin only injects nodes into the root to then, once it exits, remove them having allowed other plugins to use this data to generate output.
The tests test it specifically with custom-media and ensures that no rules are staying after it finished