-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(material/chips): fix chip density styles #26951
Conversation
wagnermaciel
commented
Apr 18, 2023
- Chip density styles were not being applied properly because of specificity issues - Stackblitz example
src/material/chips/_chips-theme.scss
Outdated
@@ -94,7 +94,8 @@ | |||
@mixin density($config-or-theme) { | |||
$density-scale: theming.get-density-config($config-or-theme); | |||
$density-scale: theming.clamp-density($density-scale, -2); | |||
.mat-mdc-chip { | |||
.mat-mdc-chip, | |||
.mat-mdc-standard-chip.mat-mdc-standard-chip { |
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.
Doesn't mat-mdc-chip
already target mat-mdc-standard-chip
?
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 think so. Should I just use .mat-mdc-chip.mat-mdc-chip
instead?
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 think that should be enough.
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.
Ah sorry, I replied too quickly. I think it should be .mat-mdc-chip.mat-mdc-standard-chip
. The basic chips don't have any styles AFAIK.
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.
Do you mean they aren't meant to have any styles? Currently in our dev-app, they are receiving density styles because we target .mat-mdc-chip
instead of .mat-mdc-standard-chip
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 think that technically they aren't supposed to have any styles.
* fix(material/chips): fix chip density styles * fixup! fix(material/chips): fix chip density styles * fixup! fix(material/chips): fix chip density styles (cherry picked from commit cffc93b)
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. |