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(material/chips): fix chip density styles #26951

Merged
merged 3 commits into from
Apr 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/material/chips/_chips-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Member

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?

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 think so. Should I just use .mat-mdc-chip.mat-mdc-chip instead?

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 think that should be enough.

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

@include mdc-chip-theme.density($density-scale, $query: mdc-helpers.$mdc-base-styles-query);
}
}
Expand Down