Skip to content

help(mat-select): Can't apply theme color because of MDC #26544

@sfinoteffy

Description

@sfinoteffy

What are you trying to do?

Trying to apply theme color to the label of mat-select, but the color that is always applied is rgba(0, 0, 0, 0.87)

What troubleshooting steps have you tried?

I applied my color with a palette, following what the documentation says:
$theme: mat.define-light-theme(( color: ( primary: $app-primary, accent: $app-accent, ), )); @include mat.all-component-themes($theme);
But it doesn't seem to have any effect on the color of mat-select label which is always rgba(0, 0, 0, 0.87). I looked into the file src/material/select/_select-theme.scss from Component library and it seems like this color comes from MDC theme, and I don't see any way to override it.

Reproduction

Steps to reproduce:

  1. Add a component mat-select to your template
  2. Apply your theme
  3. Theme is not applied to mat-select label

Environment

  • Angular: 15.1.1
  • CDK/Material: 15.1.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the teamtroubleshootingThis issue is not reporting an issue, but just asking for help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions