Angular Material 3 button not showing azure (#005cbb) color

Discussão em 'Angular' iniciado por Vamsi Krishna, Janeiro 23, 2025.

  1. This is my HTML:

    <button mat-button class="basic">Basic</button>


    This is my scss:

    .basic {
    @include mat.theme((
    color: (
    theme-type: light,
    primary: mat.$azure-palette,
    tertiary: mat.$blue-palette,
    ),
    typography: Roboto,
    density: 0,
    ));
    }


    Despite this, I keep seeing black text with white background instead of azure text.

    What I see:

    [​IMG]

    And this is what StackBlitz has it as: [​IMG]

    And I copied from this StackBlitz: https://stackblitz.com/edit/ibsvoqpb?file=src/example/button-overview-example.html,src/styles.scss

    I do see this style in the chrome dev tools:

    .mat-mdc-button:not:)disabled) {
    color: var(--mdc-text-button-label-text-color, var(--mat-sys-primary));
    }


    [​IMG]

    How can I get rid of the 'var(--mdc-text-button-label-text-color,' that is causing the text to be black?

    Continue reading...

Compartilhe esta Página