Angular Material v15 Dialog typography

Discussão em 'Angular' iniciado por whiteBear22, Setembro 10, 2024.

  1. whiteBear22

    whiteBear22 Guest

    I'm struggling with an issue since I've updated Angular Material to version 15, I had to do a migration of components. I migrated dialog component and now I'm struggling with bad typography in my dialogs. I tried to change typography in my material theme scss file. I found this in documentation:


    mat-dialog-content uses the font-settings specified by the Material Design spec, which includes a rather roomy line-height. If you have an information-dense dialog that doesn't look good with these settings, you can avoid using <mat-dialog-content> and just use a div with custom padding, or use custom typography settings that can be applied with the mat.mdc-dialog-typography mixin.
    ​

    I tried to use this mat.mdc-dialog-typography mixin like this:

    @include mat.mdc-dialog-typography($custom-typography);


    But I'm receiving an error that this mixin is not defined. Is anyone facing the same issue? Is there a workaround for this? I don't want to get rid of mat-dialog-content in all my components, I would like to apply typography to dialogs globally.

    Thank you in advance.

    Continue reading...

Compartilhe esta Página