-
-
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
[material-ui][InputBase] Use globalCss
for Pigment integration
#42431
Conversation
Netlify deploy previewhttps://deploy-preview-42431--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
Tested this PR and mui/pigment-css#31 with Material UI template, it's working correctly through Pigment CSS: |
}} | ||
/> | ||
); | ||
const InputGlobalStyles = globalCss({ |
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.
We should include this change in the API in the migration guide, if we haven't done it already.
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.
Can you explain more? I don't see any migration for InputBase. If you mean globalCss
, I plan to merge this one first and then open a new PR for Pigment CSS opt-in guide.
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.
Nevermind, this is used internally, I was thinking this will be the API we document for developers. As long as we have the same public API, it should be fine
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.
I just noticed that the same function is called injectGlobal
in emotion. It should be fine though since we don't expose this through @mui/system
@mnajdova @brijeshb42 I think this PR is ready for another review. |
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.
Looks good to me 👍
Need mui/pigment-css#31 for the test to pass.
Summary
export
globalCss
from../zero-styled
to let Pigment CSS replace the call.For default behavior, the globalCss will return
<GlobalStyles />
as usual.