Skip to content

Commit

Permalink
fix(material/chips): set correct cursor on interactive chips (angular…
Browse files Browse the repository at this point in the history
…#26171)

We were always setting the `mdc-evolution-chip__action--presentational` class on the primary chip action to avoid some very specific `:hover` styles from MDC, but the side effect was the correct cursor wasn't being applied to the action anymore.

With the new token-based API we don't generate the `:hover` styles at all so we can re-add the class and fix the cursor.

Fixes angular#26050.
  • Loading branch information
crisbeto authored and wagnermaciel committed Dec 9, 2022
1 parent 669f7e7 commit b499234
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/material/chips/chip-action.ts
Expand Up @@ -28,9 +28,7 @@ const _MatChipActionMixinBase = mixinTabIndex(_MatChipActionBase, -1);
host: {
'class': 'mdc-evolution-chip__action mat-mdc-chip-action',
'[class.mdc-evolution-chip__action--primary]': '_isPrimary',
// Note that while our actions are interactive, we have to add the `--presentational` class,
// in order to avoid some super-specific `:hover` styles from MDC.
'[class.mdc-evolution-chip__action--presentational]': '_isPrimary',
'[class.mdc-evolution-chip__action--presentational]': '!isInteractive',
'[class.mdc-evolution-chip__action--trailing]': '!_isPrimary',
'[attr.tabindex]': '_getTabindex()',
'[attr.disabled]': '_getDisabledAttribute()',
Expand Down

0 comments on commit b499234

Please sign in to comment.