Skip to content

bug(all): mat.*-overrides() do not work in inline styles #33003

@emiliodeg

Description

@emiliodeg

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

Using external SCSS files, all mat.*-overrides() work and generate tokens, but using inline styles, it does not work.

NOTE: I've created 2 Stackblitz projects with and without Tailwind CSS. and It's not related with it, because we get the same result

Reproduction

StackBlitz link with tailwind: https://stackblitz.com/edit/stackblitz-starters-grfvrcyg
StackBlitz link without tailwind: https://stackblitz.com/edit/stackblitz-starters-dyspj7b7
Steps to reproduce:

  1. Open Stackblitz link
  2. Both components have same styles, but one is inline and the other in a file

Expected Behavior

Both inline and style files should works and generate the same styles code

Actual Behavior

Inline does not generate tokens

Image

A component with inline style, generates empty host styles

Image

A component with external style file, generates host styles well

Image

Environment

  • Angular: ^21.0.0
  • CDK/Material: ^21.0.0
  • Browser(s): All
  • Operating System (e.g. Windows, macOS, Ubuntu): checked on Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: theminggemini-triagedLabel noting that an issue has been triaged by geminineeds 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