1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular 18 Material 3 Font Size [duplicate]

Discussão em 'Angular' iniciado por user3623300, Junho 30, 2025.

  1. user3623300

    user3623300 Guest

    I've been trying to upgrade from Material 2 to Material 3, and so far I have

    @use '@angular/material' as mat;
    @use 'm3-theme';

    @include mat.core();
    @include mat.all-component-typographies();

    html {
    @include mat.all-component-themes(m3-theme.$light-theme);
    }


    In my Material 2 configuration I have

    $typography-config: mat.m2-define-typography-config(
    $font-family: 'Roboto, "Helvetica Neue", sans-serif',
    $body-2: mat.m2-define-typography-level(14px, 24px, 500),
    $body-1: mat.m2-define-typography-level(14px, 20px, 400),
    $button: mat.m2-define-typography-level(14px, 36px, 500, $letter-spacing: 0.014rem),
    );


    But I can't seem to find how to specify the font size in Material 3.

    I've been reading https://material.angular.io/guide/theming and https://material.angular.io/guide/typography but I can't seem to find relevant information, or perhaps I am missing something.

    Could someone point me in the right direction to the right way to change Material 3 font sizes etc.

    Thank you.

    Continue reading...

Compartilhe esta Página