Skip to content

docs-bug(COMPONENT): Missing Source Traceability for CSS Variable Overrides in DevTools #30920

Closed
@151forShizzle

Description

@151forShizzle

Documentation Feedback

Problem
When customizing component styles in Angular Material v19 using the new theming API (@use '@angular/material/theming' and mixins like mat.button-overrides()), all CSS variables get injected into a generated utility file, typically shown in DevTools as: utils.css:xxx

This makes it impossible to trace where a style override came from when inspecting an element. Even if a developer defines a style override like this:

// src/theme/components/_button-theme.scss
@include mat.button-overrides((
filled-label-text-weight: 600;
));

The resulting CSS variable is injected into the final CSS bundle without any mapping to the original source file.

Is there any documentation about this or information how to trace back scss files and line numbers?

Affected documentation page

https://material.angular.io/components/button/api

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis issue is related to documentationneeds 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