Override Readonly/Disable Styling/CSS

Discussão em 'Angular' iniciado por spottedmahn, Dezembro 20, 2024.

  1. spottedmahn

    spottedmahn Guest

    What is the right/best way to override the material design styling when disabling input fields?

    Out of box [​IMG]

    Angular Material Input Examples


    I was able to achieve my goal w/ the following css but is that a valid way? Seems like I'm messing with the internals of Angular Material. Is there a better way?

    // override material design input field styling for readonly mode
    .mat-form-field-disabled .mat-form-field-underline {
    height: 0;
    }

    .mat-input-element:disabled {
    color: $header-text-color;
    }


    [​IMG]

    Continue reading...

Compartilhe esta Página