Skip to content

Commit

Permalink
docs(typography): add note about font-family quotes (#6742)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto authored and jelbourn committed Sep 1, 2017
1 parent 0f27e5a commit cd16ec6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions guides/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ creating a custom theme, you can create a custom **typography configuration**.
// Define a custom typography config that overrides the font-family as well as the
// `headlines` and `body-1` levels.
$custom-typography: mat-typography-config(
$font-family: monospace,
$font-family: 'Roboto, monospace',
$headline: mat-typography-level(32px, 48px, 700),
$body-1: mat-typography-level(16px, 24px, 500)
);
Expand All @@ -67,7 +67,8 @@ $custom-typography: mat-typography-config(
As the above example demonstrates, a typography configuration is created by using the
`mat-typography-config` function, which is given both the font-family and the set of typographic
levels described earlier. Each typographic level is defined by the `mat-typography-level` function,
which requires a `font-size`, `line-height`, and `font-weight`.
which requires a `font-size`, `line-height`, and `font-weight`. **Note** that the `font-family`
has to be in quotes.


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

0 comments on commit cd16ec6

Please sign in to comment.