material-components-web
material-components-web copied to clipboard
[mdc-typography] update variable overriding on website docs
Feature Request
The README.md included in the packages/mdc-typography/ directory seems to have a much more comprehensive overview of how to override the default styles for mdc-typography but the website documentation has very outdated information.
Proposed solution
Just copy the content of that README.md to the bottom of the MDC Web documentation.
Here's that README.md section I was referring to.
Gosh yes - just spent too much time wondering why this override:
@use "@material/typography" with (
$styles-headline1: (
$font-family: unquote("Arial, Helvetica, sans-serif")
),
$styles-headline2: (
$font-family: unquote("Arial, Helvetica, sans-serif"),
$font-size: 3.25rem
)
);
@use ...
Wasn't working - turns out the variable $font-family should just be font-family (being in a map). The documentation at https://material.io/develop/web/docs/typography is clearly out of date.