material-components-web icon indicating copy to clipboard operation
material-components-web copied to clipboard

[mdc-typography] update variable overriding on website docs

Open nicholaschiang opened this issue 6 years ago • 2 comments

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.

nicholaschiang avatar Apr 05 '20 04:04 nicholaschiang

Here's that README.md section I was referring to.

nicholaschiang avatar Apr 05 '20 04:04 nicholaschiang

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.

mthan160 avatar Oct 07 '20 16:10 mthan160