question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecation warning when passing a list fonts to mat-typography-config

See original GitHub issue

Bug, 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
josh18commented, Aug 29, 2017

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.:

$myFontFamily: 'Open Sans', sans-serif;

$custom-typography: mat-typography-config(
    $font-family: $myFontFamily;
);

So I guess the answer is to use the quote function:

$custom-typography: mat-typography-config(
    $font-family: quote($myFontFamily);
);

This issue can be closed unless you want to keep it open for the documentation update?

0reactions
angular-automatic-lock-bot[bot]commented, Sep 7, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found