-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(select): Disabled color and opacity #3513
Conversation
Set disabled `color` directly instead of giving the entire `mdc-select` element `opacity: .38` and relying on the default browser styles for text color.
Why are we changing this? The default guidance is 38% opacity of the overall component, which is what the code is currently doing. |
Look at the screenshots in the PR description. The existing version's text color is incorrect. Browsers automatically style disabled In addition, the old version has transparent backgrounds, whereas the new one has opaque backgrounds. |
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.
After discussing this w/ Andy and comparing against current text field disabled styles... this is at least closer to what text field is currently doing. I don't think it's necessarily 100% correct, but it's a lot more consistent than before, and we need to revisit disabled styles overall in the future anyway.
🤖 Beep boop! Screenshot test report 🚦4 screenshots changed from Details4 Changed: |
* Sets disabled `color` directly instead of giving the entire `mdc-select` element `opacity: .38` and relying on the default browser styles for text color.  
What it does
color
directly instead of giving the entiremdc-select
elementopacity: .38
and relying on the default browser styles for text color.Example output
Before:
After: