-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[docs] Make CSS interoperability examples easier to use #20860
Conversation
I guess the demo has to show that you still have to import the file in order for this approach to work.
Details of bundle changes.Comparing: 4bfcbec...6dad21d Details of page changes
|
The examples are consistent with the demos that import the css in the parent file, but I can see how this could trip someone up, so no issue with this change. Could you remove the blank line between imports though? Thanks. |
Could you also add the import to PlainCssButtonDeep |
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.
Minor changes
Would this assume too much about how developer loads the CSS? For Global CSS, I would expect it to fail in the most common cases, won't you get CSS Modules kick-in here? https://github.com/css-modules/css-modules mangling the class names? |
This is just a conventional way of 'putting stuff together', It wouldn't matter much whether you import it here or in the root component, but it sure makes things clearer. It does not guarantee any scoping or priority.... because this document is describing how to customize using plain ol' css actually. I'd expect someone using this to understand about CSS specificity rules...
From https://create-react-app.dev/docs/adding-a-css-modules-stylesheet/, quote:
|
@weisk Awesome the behavior seems identical between CRA, Next.js and Gatsby. Great to see the consolation on this topic :D |
@oliviertassinari Happy to help :D |
@weisk Thanks! It's a great first contribution to Material-UI 🎉 |
I guess the demo has to show that you still have to import the file in order for this approach to work.