Skip to content
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

fix(theming): light text on colored backgrounds should be opaque #7421

Merged
merged 1 commit into from
Jan 12, 2018
Merged

fix(theming): light text on colored backgrounds should be opaque #7421

merged 1 commit into from
Jan 12, 2018

Conversation

Maistho
Copy link
Contributor

@Maistho Maistho commented Sep 29, 2017

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

@googlebot
Copy link

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!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@googlebot googlebot added the cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla label Sep 29, 2017
@Maistho
Copy link
Contributor Author

Maistho commented Sep 29, 2017

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes PR author has agreed to Google's Contributor License Agreement and removed cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla labels Sep 29, 2017
@jelbourn
Copy link
Member

jelbourn commented Oct 6, 2017

@josephperrott can you take a look to see how this compares to the spec / mdc-web?

@josephperrott
Copy link
Member

@jelbourn
These changes match up with the values currently in the spec (under the heading Text on backgrounds)

MDC uses the same opacity in their theming

@Maistho Can you rebase the PR?

@jelbourn jelbourn added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful pr: needs review labels Oct 6, 2017
@Maistho
Copy link
Contributor Author

Maistho commented Oct 6, 2017

@josephperrott I've rebased it!

@josephperrott
Copy link
Member

@Maistho Looks like there are some build errors now?

@Maistho
Copy link
Contributor Author

Maistho commented Oct 10, 2017

@josephperrott Sorry, I had apparently used $dark-disabled in some places and $dark-disabled-text in others.

Fixed it and rebased on master again.

$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);
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and rebased

@jelbourn jelbourn added merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 12, 2017
@jelbourn
Copy link
Member

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.

@jelbourn jelbourn added P2 The issue is important to a large percentage of users, with a workaround and removed P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Oct 26, 2017
@Maistho
Copy link
Contributor Author

Maistho commented Nov 6, 2017

Hi, what's the status on this PR? Anything I can do to help speed things up?

@jelbourn
Copy link
Member

jelbourn commented Nov 7, 2017

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.

@jelbourn
Copy link
Member

@Maistho looks like there is a test failure on CI- can you rebase and see if it goes away?

@jelbourn
Copy link
Member

@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.

@jelbourn jelbourn added the presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged label Nov 19, 2017
@Maistho
Copy link
Contributor Author

Maistho commented Nov 19, 2017

@jelbourn I've rebased it!

How do I add the deprecation notice? Not sure if you use sassdoc, if I should add it to the commit message, or if there's some other way.

I added sassdoc compatible comments for now.

@jelbourn jelbourn removed the presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged label Nov 21, 2017
@jelbourn
Copy link
Member

Looks good to me

@andrewseguin
Copy link
Contributor

andrewseguin commented Dec 13, 2017

@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

@jelbourn
Copy link
Member

I would consider this acceptable for a patch because it only changes colors

@andrewseguin andrewseguin added presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged target: patch This PR is targeted for the next patch release labels Dec 13, 2017
@andrewseguin
Copy link
Contributor

@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

xdtf190pzkp

Master (demo app, button page)

master

pr/4721 (demo app, button page)

new

@Maistho
Copy link
Contributor Author

Maistho commented Jan 11, 2018

@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%
@Maistho
Copy link
Contributor Author

Maistho commented Jan 11, 2018

@andrewseguin rebased and pushed a fixed version

@andrewseguin andrewseguin merged commit 1701b98 into angular:master Jan 12, 2018
andrewseguin pushed a commit to andrewseguin/components that referenced this pull request Jan 12, 2018
…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%
andrewseguin pushed a commit that referenced this pull request Jan 17, 2018
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%
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note P2 The issue is important to a large percentage of users, with a workaround presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text opacity in _theming.scss not in complete alignment
5 participants