Skip to content

bug(migration): Broken Angular Material 20 CSS Variables Migration #31276

Closed
@nw1n

Description

@nw1n

Is this a regression?

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

The previous version in which this bug was not present was

No response

Description

When updating to Angular Material 20 the migration of the renamed design tokens (CSS variables) doesn't work consistently, sometimes the CSS variables only get renamed once per files.

Reproduction

Not reproducible in StackBlitz, it relies on v20 update migration.

Expected Behavior

I would expect for all md CSS variables of the same name to receive the same migration.

Actual Behavior

Some md css variables get renamed, but some css variables with the same name don't get renamed.

Environment

Angular CLI: 20.0.0
Node: 22.14.0
Package Manager: npm 11.4.0
OS: darwin arm64

Angular: 20.0.0
... animations, build, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1902.11
@angular-devkit/core 20.0.0
@angular-devkit/schematics 19.2.11
@angular/cdk 20.0.1
@angular/material 20.0.1
@schematics/angular 20.0.0
ng-packagr 20.0.0
rxjs 7.8.1
typescript 5.8.3
zone.js 0.15.0

Image

Metadata

Metadata

Assignees

Labels

P2The issue is important to a large percentage of users, with a workaroundarea: ng-updateIssues related to `ng-update` integration

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions