Skip to content

Commit 0113926

Browse files
committed
docs(material/theming): update typography tables to be consistent
This change updates the top table in the typography guide to be consistent with what's implemented and with the table further down the page. It also tweaks the second table to give greater emphasis to the class names that match the typography levels when more than one class is mapped to a style.
1 parent 3703cc9 commit 0113926

File tree

1 file changed

+27
-29
lines changed

1 file changed

+27
-29
lines changed

guides/typography.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ font weight, font size, and letter spacing. Angular Material uses the [typograph
4141
from the 2018 version of the Material Design specification][2018-typography], outlined in the
4242
table below.
4343

44-
| Name | Description |
45-
|-----------------|--------------------------------------------------------------|
46-
| `headline-1` | One-off header, usually at the top of the page (e.g. a hero header). |
47-
| `headline-2` | One-off header, usually at the top of the page (e.g. a hero header). |
48-
| `headline-3` | One-off header, usually at the top of the page (e.g. a hero header). |
49-
| `headline-4` | One-off header, usually at the top of the page (e.g. a hero header). |
50-
| `headline-5` | Section heading corresponding to the `<h1>` tag. |
51-
| `headline-6` | Section heading corresponding to the `<h2>` tag. |
52-
| `subtitle-1` | Section heading corresponding to the `<h3>` tag. |
53-
| `subtitle-2` | Section heading corresponding to the `<h4>` tag. |
54-
| `body-1` | Base body text. |
55-
| `body-2` | Secondary body text. |
56-
| `caption` | Smaller body and hint text. |
57-
| `button` | Buttons and anchors. |
44+
| Level Name | CSS Class | Description |
45+
|------------------|-------------------|----------------------------|
46+
| `headline-1` | `.mat-headline-1` | H1 |
47+
| `headline-2` | `.mat-headline-2` | H2 |
48+
| `headline-3` | `.mat-headline-3` | H3 |
49+
| `headline-4` | `.mat-headline-4` | H4 |
50+
| `headline-5` | `.mat-headline-5` | H5 |
51+
| `headline-6` | `.mat-headline-6` | H6 |
52+
| `subtitle-1` | `.mat-subtitle-1` | Subtitle 1 |
53+
| `subtitle-2` | `.mat-subtitle-2` | Subtitle 2 |
54+
| `body-1` | `.mat-body-1` | Large body text |
55+
| `body-2` | `.mat-body-2` | Medium body text |
56+
| `caption` | `.mat-caption` | Smaller body and hint text |
57+
| `button` | N/A | Button text |
5858

5959
[2018-typography]: https://m2.material.io/design/typography/the-type-system.html#type-scale
6060

@@ -179,21 +179,19 @@ $my-typography: mat.define-typography-config();
179179

180180
The table below lists the CSS classes emitted and the native elements styled.
181181

182-
| CSS class | Level name | Native elements |
183-
|------------------------------------------|----------------|-----------------|
184-
| `.mat-headline-1` | `headline-1` | None |
185-
| `.mat-headline-2` | `headline-2` | None |
186-
| `.mat-headline-3` | `headline-3` | None |
187-
| `.mat-headline-4` | `headline-4` | None |
188-
| `.mat-h1` or `.mat-headline-5` | `headline-5` | `<h1>` |
189-
| `.mat-h2` or `.mat-headline-6` | `headline-6` | `<h2>` |
190-
| `.mat-h3` or `.mat-subtitle-1` | `subtitle-1` | `<h3>` |
191-
| `.mat-h4` or `.mat-body-1` | `body-1` | `<h4>` |
192-
| `.mat-h5` | None | `<h5>` |
193-
| `.mat-h6` | None | `<h6>` |
194-
| `.mat-body` or `.mat-body-2` | `body-2` | Body text |
195-
| `.mat-body-strong` or `.mat-subtitle-2` | `subtitle-2` | None |
196-
| `.mat-small` or `.mat-caption` | `caption` | None |
182+
| CSS class | Level name | Native elements |
183+
|-------------------------------------------|----------------|-----------------|
184+
| `.mat-headline-1` | `headline-1` | None |
185+
| `.mat-headline-2` | `headline-2` | None |
186+
| `.mat-headline-3` | `headline-3` | None |
187+
| `.mat-headline-4` | `headline-4` | None |
188+
| `.mat-headline-5` (or `.mat-h1`) | `headline-5` | `<h1>` |
189+
| `.mat-headline-6` (or `.mat-h2`) | `headline-6` | `<h2>` |
190+
| `.mat-subtitle-1` (or `.mat-h3`) | `subtitle-1` | `<h3>` |
191+
| `.mat-body-1` (or `.mat-h4`) | `body-1` | `<h4>` |
192+
| `.mat-body-2` (or `.mat-body`) | `body-2` | Body text |
193+
| `.mat-subtitle-2` (or `.mat-body-strong`) | `subtitle-2` | None |
194+
| `.mat-caption` (or `.mat-small`) | `caption` | None |
197195

198196
In addition to the typographic styles, these style rules also include a `margin-bottom` for
199197
headers and paragraphs. For `body` styles, text is styled within the provided CSS selector.

0 commit comments

Comments
 (0)