79164677

Date: 2024-11-07 00:27:37
Score: 1
Natty:
Report link

I was using custom font in angular 17, First I import custom font in style.scss and then i used the piece of code and just changed font variable in mat.define-typegraphy-config($font-family: '"custom_font_name"').

@use '@angular/material' as mat;

$open-sans-typography: mat.define-typography-config($font-family: '""');

@include mat.typography-hierarchy($open-sans-typography);

$app-theme: mat.define-light-theme(( typography: $open-sans-typography ));

@include mat.all-component-themes($app-theme);

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @use
  • User mentioned (0): @include
  • User mentioned (0): @include
  • Low reputation (0.5):
Posted by: MHK