-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(theme): add contrast opacity values for all color types and hues #11376
Conversation
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
TODO
Opened #11458 to track adding support for contrast parameter in |
PR #11380 open for Bottom Sheet dark theme issues. |
Opened PR #11381 to address the various dark mode demo issues which don't appear to be related to this PR at all. |
Looking good. I don't have the time to review all these changes, but good to see my work not going to waste. |
<!-- Filling out this template is required! Do not delete it when submitting a Pull Request! Without this information, your Pull Request may be auto-closed. --> ## PR Checklist Please check that your PR fulfills the following requirements: - [x] The commit message follows [our guidelines](https://github.com/angular/material/blob/master/.github/CONTRIBUTING.md#-commit-message-format) - [x] Tests for the changes have been added or this is not a bug fix / enhancement - [x] Docs have been added, updated, or were not required ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [ ] Enhancement [x] Documentation content changes [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Build related changes [ ] CI related changes [ ] Infrastructure changes [ ] Other... Please describe: ``` ## What is the current behavior? Button, chips, whiteframe, and tabs demos are significantly broken in dark mode. This makes testing theme or component changes in dark mode more difficult. <!-- Please describe the current behavior that you are modifying and link to one or more relevant issues. --> Issue Number: Relates to #11376 ## What is the new behavior? - better support for dark mode in docs and demos - style anchors to be more readable in dark mode - fix site-toolbar in dark mode and remove unused styles - fix supported browsers table in dark mode - fix button, chips, tabs, whiteframe demos in dark mode ## Does this PR introduce a breaking change? ``` [ ] Yes [x] No ``` <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> <!-- Note that breaking changes are highly unlikely to get merged to master unless the validation is clear and the use case is critical. --> ## Other information
<!-- Filling out this template is required! Do not delete it when submitting a Pull Request! Without this information, your Pull Request may be auto-closed. --> ## PR Checklist Please check that your PR fulfills the following requirements: - [x] The commit message follows [our guidelines](https://github.com/angular/material/blob/master/.github/CONTRIBUTING.md#-commit-message-format) - [x] Tests for the changes have been added or this is not a bug fix / enhancement - [x] Docs have been added, updated, or were not required ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [ ] Enhancement [x] Documentation content changes [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Build related changes [ ] CI related changes [ ] Infrastructure changes [ ] Other... Please describe: ``` ## What is the current behavior? Button, chips, whiteframe, and tabs demos are significantly broken in dark mode. This makes testing theme or component changes in dark mode more difficult. <!-- Please describe the current behavior that you are modifying and link to one or more relevant issues. --> Issue Number: Relates to #11376 ## What is the new behavior? - better support for dark mode in docs and demos - style anchors to be more readable in dark mode - fix site-toolbar in dark mode and remove unused styles - fix supported browsers table in dark mode - fix button, chips, tabs, whiteframe demos in dark mode ## Does this PR introduce a breaking change? ``` [ ] Yes [x] No ``` <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> <!-- Note that breaking changes are highly unlikely to get merged to master unless the validation is clear and the use case is critical. --> ## Other information
<!-- Filling out this template is required! Do not delete it when submitting a Pull Request! Without this information, your Pull Request may be auto-closed. --> ## PR Checklist Please check that your PR fulfills the following requirements: - [x] The commit message follows [our guidelines](https://github.com/angular/material/blob/master/.github/CONTRIBUTING.md#-commit-message-format) - [x] Tests for the changes have been added or this is not a bug fix / enhancement - [x] Docs have been added, updated, or were not required ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [ ] Enhancement [x] Documentation content changes [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Build related changes [ ] CI related changes [ ] Infrastructure changes [ ] Other... Please describe: ``` ## What is the current behavior? Button, chips, whiteframe, and tabs demos are significantly broken in dark mode. This makes testing theme or component changes in dark mode more difficult. <!-- Please describe the current behavior that you are modifying and link to one or more relevant issues. --> Issue Number: Relates to #11376 ## What is the new behavior? - better support for dark mode in docs and demos - style anchors to be more readable in dark mode - fix site-toolbar in dark mode and remove unused styles - fix supported browsers table in dark mode - fix button, chips, tabs, whiteframe demos in dark mode ## Does this PR introduce a breaking change? ``` [ ] Yes [x] No ``` <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> <!-- Note that breaking changes are highly unlikely to get merged to master unless the validation is clear and the use case is critical. --> ## Other information
a04cdd2
to
1484552
Compare
75b4b37
to
0fbf631
Compare
0fbf631
to
90773f0
Compare
90773f0
to
a3cf860
Compare
Rebased, squashed, and updated. TODO:
|
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.
LGTM
Add opacity keyword support (`secondary`, `icon`, `disabled`, `hint`, `divider`) Deprecate documentation of `foreground-*` in favor of `background-default-contrast-*` Allow `foregroundPallete` to override colors on default background and hues of equal contrast type
a3cf860
to
b294cf0
Compare
3b85682
to
a9a8eca
Compare
I don't believe that the changes to the internal mini-DSL for defining theme files in components should cause any breakages to apps built with the library. There may be some impacts to |
…lint issues - fix lint warning of unnecessary escape in regex and missing colon - resolve test failures after merge - `md-colors` demos general cleanup and fix URLs and icons - clarify how to map the old foreground expressions in theming docs - update links to opacity requirements for icons - clean up Theming implementation guide
a9a8eca
to
a03aa2a
Compare
PR Checklist
Please check that your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number:
N/A
What is the new behavior?
secondary
,icon
,disabled
,hint
,divider
)foreground-*
in favor ofbackground-default-contrast-*
foregroundPalette
to override colors on default background and hues of equal contrast typeDoes this PR introduce a breaking change?
Other information
This is based on @clshortfuse's PR #8872.