From 36dd77ef97bfa9fbbd9f3a8885f010cb0741e797 Mon Sep 17 00:00:00 2001 From: Elizabeth Mitchell Date: Wed, 6 Mar 2024 10:13:57 -0800 Subject: [PATCH] feat(typography): add `@material/web/typography/md-typescale` classes Fixes #1050 View the updated [typography docs](https://github.com/material-components/material-web/blob/main/docs/theming/typography.md#classes) for more info. PiperOrigin-RevId: 613259080 --- divider/demo/stories.ts | 34 +-- docs/theming/typography.md | 32 ++- iconbutton/demo/stories.ts | 42 ++-- labs/card/demo/stories.ts | 62 +++--- tabs/demo/stories.ts | 391 ++++++++++++++++++++++++----------- typography/_typescale.scss | 111 +++++++++- typography/md-typescale.scss | 11 + 7 files changed, 492 insertions(+), 191 deletions(-) create mode 100644 typography/md-typescale.scss diff --git a/divider/demo/stories.ts b/divider/demo/stories.ts index 0e2362b3a9..9d39a80cf2 100644 --- a/divider/demo/stories.ts +++ b/divider/demo/stories.ts @@ -7,6 +7,7 @@ import '@material/web/divider/divider.js'; import {MaterialStoryInit} from './material-collection.js'; +import {styles as typescaleStyles} from '@material/web/typography/md-typescale.js'; import {css, html} from 'lit'; /** Knob types for divider stories. */ @@ -18,25 +19,28 @@ export interface StoryKnobs { const standard: MaterialStoryInit = { name: 'Divider', - styles: css` - ul { - border: 1px solid var(--md-sys-color-outline); - margin: 0; - padding: 0; - width: 256px; - } + styles: [ + typescaleStyles, + css` + ul { + border: 1px solid var(--md-sys-color-outline); + margin: 0; + padding: 0; + width: 256px; + } - li { - color: var(--md-sys-color-on-background); - font-family: system-ui; - list-style: none; - margin: 16px; - } - `, + li { + color: var(--md-sys-color-on-background); + list-style: none; + margin: 16px; + } + `, + ], render(knobs) { return html`