Skip to content

bug(M2-theme): system variables are not loading in 19 #31926

@AnnaPerry

Description

@AnnaPerry

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

I'm upgrading to Angular 19 and we're using M2 theming.
@include mat.core-theme($light-theme); was removed automatically during the migration. And the expectation is that styles will rely on system variables (prefixed with --mat-sys-), however they are not loading:

Image

Could someone take a look into this? Thank you

Reproduction

StackBlitz link: https://stackblitz.com/edit/jal8tzjj?file=src%2Fstyles.scss
Steps to reproduce:

  1. Open dropdown
  2. Notice no hover styling, font is smaller, sys vars are not loading in dev tools

Expected Behavior

Since sys variables were introduced in 19 version, I'm not sure if this is the expected behaviour or not. Are system variables supposed to work with M2? Are we supposed to use mat.core-theme() to bring the old vars back instead?

Actual Behavior

System variables are not loading

Environment

  • Angular: 19.2.9
  • CDK/Material: 19.2.9
  • Browser(s): Chrome
  • Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions