Angular Material 19 - Theme overrides don't work unless wrapped with MDC classes

Discussão em 'Angular' iniciado por Jakub Krasnan, Março 20, 2025.

  1. I'm trying to customize Material chips using the Angular Material theming system. I expected this approach to work:

    @include mat.chips-theme(...);
    @include mat.chips-overrides(...);


    However, this approach doesn't work as expected. I found that I need to specifically target MDC classes for my overrides to take effect:

    @include mat.chips-theme(...);

    mat-chip-grid .mat-mdc-chip.mat-mdc-standard-chip {
    @include mat.chips-overrides(...);
    }


    Is there something wrong with expectation that using overrides without wrapping them in *-mdc-* classes should work? It seem that when using mat.chips-theme(), it sets styles that take precedence over generic overrides.

    Environment:

    Angular Material version: 19.2.2

    Continue reading...

Compartilhe esta Página