diff --git a/packages/webawesome/docs/docs/utilities/text.md b/packages/webawesome/docs/docs/utilities/text.md index 35fcdd77e..ba06a5cff 100644 --- a/packages/webawesome/docs/docs/utilities/text.md +++ b/packages/webawesome/docs/docs/utilities/text.md @@ -1,66 +1,159 @@ --- title: Text -description: Text utility classes combine custom properties from your Web Awesome theme to conveniently style text content. +description: Text utility classes use custom properties from your Web Awesome theme and other standard CSS properties to style text elements on the fly. layout: docs tags: styleUtilities --- -Web Awesome includes classes to set multiple text properties at once to style body text, headings, and captions. + + +{{ description }} ## Body -Use body classes to style the main content of your pages. Each `wa-body-*` class specifies the following properties: +Use `wa-body-*` classes to style the main content of your pages. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme. -- `font-family: var(--wa-font-family-body);` -- `font-weight: var(--wa-font-weight-body);` -- `line-height: var(--wa-line-height-normal);` +Alternatively, use `wa-body` to apply the same styling without an explicit font size. -Additionally, each class specifies a `font-size` that corresponds to a [`--wa-font-size-*`](/docs/tokens/typography/#font-size) token from your theme. - -| Class Name | `font-size` Value | Preview | -| ------------ | ------------------- | ------------------------------------------------------------------- | -| `wa-body-xs` | `--wa-font-size-xs` |
Sphinx of black quartz, judge my vow.
| -| `wa-body-s` | `--wa-font-size-s` |
Sphinx of black quartz, judge my vow.
| -| `wa-body-m` | `--wa-font-size-m` |
Sphinx of black quartz, judge my vow.
| -| `wa-body-l` | `--wa-font-size-l` |
Sphinx of black quartz, judge my vow.
| -| `wa-body-xl` | `--wa-font-size-xl` |
Sphinx of black quartz, judge my vow.
| +| Class Name | Preview | +| ------------- | -------------------------------------------------- | +| `wa-body-2xs` |
Five boxing wizards
| +| `wa-body-xs` |
Five boxing wizards
| +| `wa-body-s` |
Five boxing wizards
| +| `wa-body-m` |
Five boxing wizards
| +| `wa-body-l` |
Five boxing wizards
| +| `wa-body-xl` |
Five boxing wizards
| +| `wa-body-2xl` |
Five boxing wizards
| +| `wa-body-3xl` |
Five boxing wizards
| +| `wa-body-4xl` |
Five boxing wizards
| ## Headings -Use heading classes to style section titles and headings in your content. Each `wa-heading-*` class specifies the following properties: +Use `wa-heading-*` classes to style section titles and headings in your content. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme. -- `font-family: var(--wa-font-family-heading);` -- `font-weight: var(--wa-font-weight-heading);` -- `line-height: var(--wa-line-height-condensed);` -- `text-wrap: balance;` +Alternatively, use `wa-heading` to apply the same styling without an explicit font size. -Additionally, each class specifies a `font-size` using a [`--wa-font-size-*`](/docs/tokens/typography/#font-size) token from your theme. Heading classes are one font size larger than the corresponding `wa-body-*` class. - -| Class Name | `font-size` Value | Preview | -| ---------------- | -------------------- | ----------------------------------------------------- | -| `wa-heading-xs` | `--wa-font-size-s` |
Five Boxing Wizards
| -| `wa-heading-s` | `--wa-font-size-m` |
Five Boxing Wizards
| -| `wa-heading-m` | `--wa-font-size-l` |
Five Boxing Wizards
| -| `wa-heading-l` | `--wa-font-size-xl` |
Five Boxing Wizards
| -| `wa-heading-xl` | `--wa-font-size-2xl` |
Five Boxing Wizards
| -| `wa-heading-2xl` | `--wa-font-size-3xl` |
Five Boxing Wizards
| -| `wa-heading-3xl` | `--wa-font-size-4xl` |
Five Boxing Wizards
| +| Class Name | Preview | +| ---------------- | ----------------------------------------------------- | +| `wa-heading-2xs` |
Five boxing wizards
| +| `wa-heading-xs` |
Five boxing wizards
| +| `wa-heading-s` |
Five boxing wizards
| +| `wa-heading-m` |
Five boxing wizards
| +| `wa-heading-l` |
Five boxing wizards
| +| `wa-heading-xl` |
Five boxing wizards
| +| `wa-heading-2xl` |
Five boxing wizards
| +| `wa-heading-3xl` |
Five boxing wizards
| +| `wa-heading-4xl` |
Five boxing wizards
| ## Captions -Use caption classes to style descriptions or auxiliary text in your content. Each `wa-caption-*` class specifies the following properties: +Use `wa-caption-*` classes to style descriptions or auxiliary text in your content. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme. -- `color: var(--wa-color-text-quiet);` -- `font-family: var(--wa-font-family-body);` -- `font-weight: var(--wa-font-weight-body);` -- `line-height: var(--wa-line-height-condensed);` +Alternatively, use `wa-caption` to apply the same styling without an explicit font size. -Additionally, each class specifies a `font-size` using a [`--wa-font-size-*`](/docs/tokens/typography/#font-size) token from your theme. Caption classes are one font size smaller than the corresponding `wa-body-*` class. +| Class Name | Preview | +| ---------------- | ----------------------------------------------------- | +| `wa-caption-2xs` |
Five boxing wizards
| +| `wa-caption-xs` |
Five boxing wizards
| +| `wa-caption-s` |
Five boxing wizards
| +| `wa-caption-m` |
Five boxing wizards
| +| `wa-caption-l` |
Five boxing wizards
| +| `wa-caption-xl` |
Five boxing wizards
| +| `wa-caption-2xl` |
Five boxing wizards
| +| `wa-caption-3xl` |
Five boxing wizards
| +| `wa-caption-4xl` |
Five boxing wizards
| -| Class Name | `font-size` Value | Preview | -| --------------- | -------------------- | ----------------------------------------------------------------------------- | -| `wa-caption-xs` | `--wa-font-size-2xs` |
The quick brown fox jumps over the lazy dog.
| -| `wa-caption-s` | `--wa-font-size-xs` |
The quick brown fox jumps over the lazy dog.
| -| `wa-caption-m` | `--wa-font-size-s` |
The quick brown fox jumps over the lazy dog.
| -| `wa-caption-l` | `--wa-font-size-m` |
The quick brown fox jumps over the lazy dog.
| -| `wa-caption-xl` | `--wa-font-size-l` |
The quick brown fox jumps over the lazy dog.
| +## Longform + +Use `wa-longform-*` classes to style lengthy content like essays or blog posts. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme. + +Alternatively, use `wa-longform` to apply the same styling without an explicit font size. + +| Class Name | Preview | +| ----------------- | ------------------------------------------------------ | +| `wa-longform-2xs` |
Five boxing wizards
| +| `wa-longform-xs` |
Five boxing wizards
| +| `wa-longform-s` |
Five boxing wizards
| +| `wa-longform-m` |
Five boxing wizards
| +| `wa-longform-l` |
Five boxing wizards
| +| `wa-longform-xl` |
Five boxing wizards
| +| `wa-longform-2xl` |
Five boxing wizards
| +| `wa-longform-3xl` |
Five boxing wizards
| +| `wa-longform-4xl` |
Five boxing wizards
| + +## Links + +Use `wa-link` to give interactive text a link-like appearance. Alternatively, use `wa-link-plain` to remove typical link styles from `` elements. + +| Class Name | Preview | +| --------------- | -------------------------------------------------------- | +| `wa-link` | | +| `wa-link-plain` | Five boxing wizards | + +## Lists + +Ordered (`
    `) and unordered (`