-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(theming): light text on colored backgrounds should be opaque #7421
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
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
@josephperrott can you take a look to see how this compares to the spec / mdc-web? |
@josephperrott I've rebased it! |
@Maistho Looks like there are some build errors now? |
@josephperrott Sorry, I had apparently used Fixed it and rebased on master again. |
src/lib/core/theming/_palette.scss
Outdated
$dark-disabled-text: rgba(black, 0.38); | ||
$dark-dividers: rgba(black, 0.12); | ||
$dark-focused: rgba(black, 0.12); | ||
$light-primary-text: rgba(white, 1); |
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.
rgba(white, 1)
can just be white
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 felt like it was more clear/explicit that the opacity should be 100% if I typed it out, but I can change it if you prefer it.
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.
Yeah, I prefer to use the plain value when it is desired
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.
Fixed and rebased
Caretaker note: this PR will likely affect many screenshot tests and should be synced by itself. Reach out to teams to ensure that everything still looks correct. |
Hi, what's the status on this PR? Anything I can do to help speed things up? |
Our merge process is just a bit behind at the moment; see https://github.com/angular/material2/blob/master/CODE_REVIEWS.md#how-prs-are-merged for more context. This change is particularly involved because it involves updating many screenshot tests. |
@Maistho looks like there is a test failure on CI- can you rebase and see if it goes away? |
@Maistho can you also restore the removed scss variables and mark them as deprecated? Upon running an internal presubmit it turns out quite a large number of apps consume on them. |
Looks good to me |
@jelbourn Tests pass - do you consider this a patch or minor Edit: Re-running internal tests, looks like a lot of them happened to fall through when skipping already failing tests |
I would consider this acceptable for a patch because it only changes colors |
@Maistho Thanks for your patience as we try and get this merged in. We're seeing some screenshot diffs get brought up that might point out something incorrect in this PR. Can you look at these screenshots and confirm the appearance of the disabled button? Looks like your change made it darker which in my eyes doesn't match the spec. Spec Master (demo app, button page) pr/4721 (demo app, button page) |
@andrewseguin Yup, I made a mistake there. Looks like the disabled buttons are using the text color for background. I'll take a look! |
According to [Material Design Guidelines](https://material.io/guidelines/style/color.html#color-usability) white text on colored backgrounds should do so at an opacity of 100%
@andrewseguin rebased and pushed a fixed version |
…ular#7421) According to [Material Design Guidelines](https://material.io/guidelines/style/color.html#color-usability) white text on colored backgrounds should do so at an opacity of 100%
According to [Material Design Guidelines](https://material.io/guidelines/style/color.html#color-usability) white text on colored backgrounds should do so at an opacity of 100%
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
According to Material Design Guidelines, white text on colored backgrounds should be displayed at an opacity of 100%.
I also changed the naming of the variables to [dark/light]-primary-text instead of [black/white]-87-opacity, since it better reflects the names used in the guidelines.
This PR fixes #6236