-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/checkbox): refactor to depend on @angular/material/core/tokens #26744
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
020b823
fix(material/checkbox): refactor to depend on @angular/material/core/…
mmalerba d3d5009
add checkbox tokens with placeholder values
mmalerba 15f8b5c
add styles for token slots and values to checkbox
mmalerba b946092
fill in real token values and fix checkbox appearance
mmalerba 82d3641
clean up unnecessary code
mmalerba b0e61a3
fix mat-list
mmalerba 393fa65
fix ci
mmalerba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't quite understand why we're passing in a primary palette into a key called
accent
here and in thewarn
theme.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.
Our
.mat-primary
,.mat-accent
, .mat-warn classes don't really fit well with the token-based theming. There aren't separate tokens for e.g.checkbox-color-when-primary
,checkbox-color-when-accent
. Instead I set up the tokens to draw their values from the default flavor of checkbox (accent). In order to still support the.mat-primary
and.mat-warn
, I just callget-color-tokens
passing the desired palette as the accent palette to get the styles we want.Ultimately I think we'll want to deprecate and remove the class based theming, but this seemed like a decent solution for now