-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[classes] Normalize the classes names #10457
[classes] Normalize the classes names #10457
Conversation
e9507d0
to
efa1c8e
Compare
2bad6da
to
8108a78
Compare
@@ -168,12 +168,12 @@ const styles = theme => ({ | |||
fontFamily: 'Consolas, "Liberation Mono", Menlo, monospace', | |||
}, | |||
'& .required': { | |||
color: theme.palette.type === 'light' ? '#008900' : '#65a665', | |||
color: theme.palette.type === 'light' ? '#006500' : '#9bc89b', |
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.
AAA contrast
14a067f
to
95db90f
Compare
95db90f
to
2f181eb
Compare
I'm trying to understand this change but don't quite get it without an example. |
@xaviergonz Nothing has changed on this end yet. This pull-request was only about normalizing and documenting the logic behind the classes wordings. I will ping you once I have a prototype of the change we can apply to solve the issue. Does that sounds good? |
@oliviertassinari sounds great :) |
Breaking change
This is an effort in order to harmonize the classes API. The best way to recover from this breaking change is to check the warnings in the console and to check the added documentation around the design rules around this API.
I'm quite happy with the current "classes" state, the main thing missing is documented in the roadmap:
CSS Classes
All the components accept a
classes
property to customize the styles.The classes design answers two constraints.
We try to make the classes structure as simple as possible while keeping it complex enough for implementing the Material specification.
root
.dashedXX
.rounded
.colorXX
.For instance, the
color
andvariant
properties are considered a variant.The lower the style specificity is, the simpler you can override it.
:hover
,:focus
, etc.). It allows much more control at the cost of extra complexity. Hopefully, it's more intuitive.