Skip to content

Conversation

@wagnermaciel
Copy link
Contributor

  • Chip density styles were not being applied properly because of specificity issues - Stackblitz example

@wagnermaciel wagnermaciel marked this pull request as ready for review April 18, 2023 20:20
$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.

@wagnermaciel wagnermaciel added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate labels Apr 24, 2023
@angular-robot angular-robot bot merged commit cffc93b into angular:main Apr 25, 2023
angular-robot bot pushed a commit that referenced this pull request Apr 25, 2023
* 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)
@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 Jun 6, 2023
@wagnermaciel wagnermaciel deleted the chips-density branch November 20, 2025 19:23
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 target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants