Angular Material 18: light/dark theme not working properly

Discussão em 'Angular' iniciado por MatterOfFact, Dezembro 19, 2024.

  1. MatterOfFact

    MatterOfFact Guest

    Stack Blitz example: https://stackblitz.com/edit/stackblitz-starters-ajqpjxrh?file=src/main.ts

    I implemented a light and a dark theme for angular material 18, see stack blitz example. it seems to work somehow, but some styles don't seem to be set correctly. See for example the menu overlay or the submit button tooltip. It seems that css variables have been lost, for example --mat-menu-container-shape. What have I done wrong or how can I implement light/dark mode so that all styles are applied correctly and I can switch the mode via css class?

    Continue reading...

Compartilhe esta Página