Deprecation warning when passing a list fonts to mat-typography-config
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
mat-typography-config
accepts a list of fonts.
What is the current behavior?
mat-typography-config
throws a deprecation error:
DEPRECATION WARNING: Passing "Open Sans", sans-serif, a non-string value, to unquote() will be an error in future versions of Sass.
What are the steps to reproduce?
$custom-typography: mat-typography-config(
$font-family: 'Open Sans', sans-serif;
);
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Angular Material Theming System - Complete Guide
In Angular Material, a theme is a collection of color and typography options. Each theme includes three palettes that determine component colors: primary, ......
Read more >angular/material/_theming.scss - UNPKG
1419, // Warning that will be printed if duplicated styles are generated by a theme. 1420, $_mat-theme-duplicate-warning: 'Read more about how style ...
Read more >Customizing Typography - Angular Material
Angular Material's typography APIs lets you specify any font-face. ... The table below lists the CSS classes emitted and the native elements styled....
Read more >How to start an Angular project? - A CV
The solution is: module path aliases! Check out this intro about it! There are two places where you need to maintain the list...
Read more >Angular UI/Material Design Flashcards by uday A - Brainscape
The Angular Layout API is an intuitive list of HTML directives (aka ... Warn Font size px. Min size: 10px. 82. Q. dynamically...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah you are right, it does throw a compile error if you put in
'Open Sans', sans-serif
😳. However if you use a variable it throws the deprecation warning, e.g.:So I guess the answer is to use the quote function:
This issue can be closed unless you want to keep it open for the documentation update?
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.