Material Angular force light/dark theme on single component

Viewed 294

i configure two Material themes in my angular application.

@include mat.all-component-themes($lightTheme);

.dark {
  @include mat.all-component-themes($darkTheme);
}

and all works fine, when i add "dark" class to "html" tag, the theme switch to dark mode.

In the application, my sidebar is always dark so i need to use a "mat-select" with light style even if dark theme is selected.

There is a mode to force a material component to use a specific style?

Thanks

1 Answers

Can you add the "light" theme to the mat select?

e.g

<mat-select panelClass="light"></mat-select>
Related