-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
[enhancement] Reorder the css generation order for styled calls #56
Conversation
a5dc82c
to
5d3f230
Compare
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.
👍 Thanks a lot
Tested, it works like a charm! |
to match with @mui/system Fixes mui#55
5d3f230
to
983a6a8
Compare
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.
Nice catch. I can understand how both of these orders would make sense. Personally, I would go with the previous implementation, where basic styles override basic styles, and variants override variants - we weren't able to do this previously with emotion, as the styles were defined via callback and people could have used props there. I remember for example this issue: mui/material-ui#29529 where the order was not really intuitive.
I will try to get more insights into what would be more intuitive solution.
* 3. Variants declared in styled call | ||
* 2. CSS declared in theme object's styledOverrides |
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.
The number of the list are wrong.
Yeah. The only reason to change this is to maintain compatibility with system. I had also discussed this order way back during the early implementations and why that made sense. |
to match with @mui/system
Fixes #55