Skip to content

Commit cd16ec6

Browse files
crisbetojelbourn
authored andcommitted
docs(typography): add note about font-family quotes (#6742)
Adds a note to the typography guide about the font-family having to be quoted. It seems like we can't handle this gracefull within the mixin using the built-in `is-string` function from SASS. Fixes #6668.
1 parent 0f27e5a commit cd16ec6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

guides/typography.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ creating a custom theme, you can create a custom **typography configuration**.
5858
// Define a custom typography config that overrides the font-family as well as the
5959
// `headlines` and `body-1` levels.
6060
$custom-typography: mat-typography-config(
61-
$font-family: monospace,
61+
$font-family: 'Roboto, monospace',
6262
$headline: mat-typography-level(32px, 48px, 700),
6363
$body-1: mat-typography-level(16px, 24px, 500)
6464
);
@@ -67,7 +67,8 @@ $custom-typography: mat-typography-config(
6767
As the above example demonstrates, a typography configuration is created by using the
6868
`mat-typography-config` function, which is given both the font-family and the set of typographic
6969
levels described earlier. Each typographic level is defined by the `mat-typography-level` function,
70-
which requires a `font-size`, `line-height`, and `font-weight`.
70+
which requires a `font-size`, `line-height`, and `font-weight`. **Note** that the `font-family`
71+
has to be in quotes.
7172

7273

7374
Once the custom typography definition is created, it can be consumed to generate styles via

0 commit comments

Comments
 (0)