You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: polaris.shopify.com/content/components/typography/text.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,26 @@ examples:
45
45
Use to set text color.
46
46
---
47
47
48
+
## Variant tokens
49
+
50
+
Each variant uses a predetermined combination of the [font tokens](/tokens/font) to set the font size and line height. Heading variants have a set font weight but can be overridden by using the `fontWeight` prop.
51
+
52
+
| Variant | Font size token | px value | rem value | Font line height token | Font weight token | Reponsive |
|`headingMd`|`--p-font-size-200`| 16 | 1 |`--p-line-height-3`|`--p-font-weight-semibold`| No |
60
+
|`headingSm`|`--p-font-size-100`| 14 | 0.875 |`--p-line-height-2`|`--p-font-weight-semibold`| No |
61
+
|`headingXs`|`--p-font-size-75`| 12 | 0.75 |`--p-line-height-1`|`--p-font-weight-semibold`| No |
62
+
|`bodyLg`|`--p-font-size-200`| 16 | 1 |`--p-line-height-2`|`--p-font-weight-regular`| No |
63
+
|`bodyMd`|`--p-font-size-100`| 14 | 0.875 |`--p-line-height-2`|`--p-font-weight-regular`| No |
64
+
|`bodySm`|`--p-font-size-75`| 12 | 0.75 |`--p-line-height-1`|`--p-font-weight-regular`| No |
65
+
66
+
---
67
+
48
68
## Mapping from previous type components
49
69
50
70
These are suggested replacements for existing text style components, but ultimately the best replacement should be evaluated based on the context of the usage. The `Text` component also requires setting the semantically appropriate html element through the `as` prop.
0 commit comments