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

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
@@ -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.

@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
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