-
-
Notifications
You must be signed in to change notification settings - Fork 3.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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add css reset scope #7464
Conversation
🦋 Changeset detectedLatest commit: efebc94 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
👏 Thanks a ton for this, this will mean so much for adoption across large orgs with existing code bases. |
Has this been released yet? |
@posabsolute released per this merged Version Package |
I think there are still some issues with the scoped CSS, most is scoped but some of the reset still leaks globally. I would expect HTML would not receive any styling, at least things like font and line height should not be affected. |
The other thing that would help for this feature is where the CSS is added, with styled-components you can define where the styles are added. In micro front-ends its very possible we load multiple apps, so it's less error prone to have the CSS leave when the app is unloaded. This is the target option in StyleSheetManager from styled-component |
@segunadebayo this is breaking in chrome browsers below version 88 because it changes to using the |
Hey @TylerAPfledderer, I gave it a go, it's almost there but if you add a ck-reset parent, then it overrides styles from the main components, example below: |
Do you have any updates how to fix this? |
Closes #6946
📝 Description
Add support for scoping the css reset to a specific selector.
To use this feature, pass the
resetScope
prop to theChakraProvider
orChakraBaseProvider
component.💣 Is this a breaking change (Yes/No):
No
📝 Additional Information