material-components / material-components-web

Modular and customizable Material Design UI components for the web
https://material.io/develop/web
MIT License
17.14k stars 2.15k forks source link

[mdc-typography] update variable overriding on website docs #5780

Open nicholaschiang opened 4 years ago

nicholaschiang commented 4 years ago

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 commented 4 years ago

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

mthan160 commented 4 years ago

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.