components icon indicating copy to clipboard operation
components copied to clipboard

bug(MatChipSet): Margin changed between 22.1.x and 22.2.x

Open anwalkers opened this issue 2 weeks ago • 1 comments

Is this a regression?

  • [x] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

22.1.x

Description

Margin for mat-chip-set has changed and our visual regression tests are now failing.

22.1.x style: .mat-mdc-chip-set .mdc-evolution-chip { margin: 4px 0 4px 8px; }

22.2.x style: .mat-mdc-chip-set .mdc-evolution-chip { margin: 8px 0 8px 8px; }

PR with change: https://github.com/angular/components/pull/33614

Reproduction

StackBlitz link: Steps to reproduce:

  1. Compare styles for mat-chip in v21 and v22

Expected Behavior

Visual regression tests shouldn't fail and margins should either be overridable using mat.chips-overrides(()) or rolled back to the old margins.

Actual Behavior

An additional 8px margin between chips has been added between versions.

Environment

  • Angular: 22.2.5
  • CDK/Material: 22.2.6
  • Browser(s): All
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows/WSL (Ubuntu 26)

anwalkers avatar Nov 12 '26 19:11 anwalkers

Closing this because:

  1. We did it to address an accessibility issue.
  2. It's fairly straightforward to override the margin if it's a problem.

crisbeto avatar Nov 12 '26 22:11 crisbeto