# Steps

> Where the user is in a task of several steps, such as a checkout or a setup wizard, as a numbered list. Steps can be buttons that go back.

`<slab-steps>` · Navigation · built on `<ol> + aria-current="step"`

## Install

```sh
pnpm add slab-elements lit
```

## Usage

### React

`MySteps.jsx`. React 19 or later, which sets props on custom elements as properties.

```jsx
import 'slab-elements/steps.js';
import 'slab-elements/steps.step.js';

export function MySteps() {
  return (
    <slab-steps label="Checkout" step={2} navigable>
      <slab-steps-step>Cart</slab-steps-step>
      <slab-steps-step>Shipping</slab-steps-step>
      <slab-steps-step disabled>Payment</slab-steps-step>
    </slab-steps>
  );
}
```

### Lit

`my-steps.ts`. Slab is built on Lit, so its elements are at home in Lit's templates.

```ts
import 'slab-elements/steps.js';
import 'slab-elements/steps.step.js';
import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';

@customElement('my-steps')
export class MySteps extends LitElement {
  render() {
    return html`
      <slab-steps label="Checkout" step="2" navigable>
        <slab-steps-step>Cart</slab-steps-step>
        <slab-steps-step>Shipping</slab-steps-step>
        <slab-steps-step disabled>Payment</slab-steps-step>
      </slab-steps>
    `;
  }
}
```

### Vue

`MySteps.vue`. Let Vue's compiler know slab- tags are custom elements with isCustomElement.

```vue
<script setup>
import 'slab-elements/steps.js';
import 'slab-elements/steps.step.js';
</script>

<template>
  <slab-steps label="Checkout" :step="2" navigable>
    <slab-steps-step>Cart</slab-steps-step>
    <slab-steps-step>Shipping</slab-steps-step>
    <slab-steps-step disabled>Payment</slab-steps-step>
  </slab-steps>
</template>
```

### Svelte

`MySteps.svelte`. Svelte binds properties and events to custom elements like any other element.

```svelte
<script>
  import 'slab-elements/steps.js';
  import 'slab-elements/steps.step.js';
</script>

<slab-steps label="Checkout" step={2} navigable>
  <slab-steps-step>Cart</slab-steps-step>
  <slab-steps-step>Shipping</slab-steps-step>
  <slab-steps-step disabled>Payment</slab-steps-step>
</slab-steps>
```

### Ember

`MySteps.gjs`. Ember sets attributes, and a dynamic value like {{this.max}} sets the property when the element has one. {{on}} listens for any event by its name.

```gjs
import 'slab-elements/steps.js';
import 'slab-elements/steps.step.js';

export const MySteps = <template>
  <slab-steps label="Checkout" step="2" navigable>
    <slab-steps-step>Cart</slab-steps-step>
    <slab-steps-step>Shipping</slab-steps-step>
    <slab-steps-step disabled>Payment</slab-steps-step>
  </slab-steps>
</template>;
```

### HTML

`index.html`. Any bundler (or an import map) takes care of the imports.

```html
<script type="module">
  import 'slab-elements/steps.js';
  import 'slab-elements/steps.step.js';
</script>

<slab-steps label="Checkout" step="2" navigable>
  <slab-steps-step>Cart</slab-steps-step>
  <slab-steps-step>Shipping</slab-steps-step>
  <slab-steps-step disabled>Payment</slab-steps-step>
</slab-steps>
```

## Example

Here's a styled version, `<slab-styled-steps>`. It's not in the package — it's an example of what you can build with the headless element. Copy it and make it yours at the bottom of this page.

```html
<slab-styled-steps label="Pour" step="3">
  <slab-styled-steps-step>
    Survey
    <span slot="description">Lot staked</span>
  </slab-styled-steps-step>
  <slab-styled-steps-step>
    Forms
    <span slot="description">Rebar tied</span>
  </slab-styled-steps-step>
  <slab-styled-steps-step>
    Pour
    <span slot="description">Truck at 7am</span>
  </slab-styled-steps-step>
  <slab-styled-steps-step>
    Cure
    <span slot="description">Seven days</span>
  </slab-styled-steps-step>
</slab-styled-steps>
```

Swap `slab-styled-` for `slab-` in that markup and you've got the same example as it ships: the headless elements with no CSS at all. That's your starting point.

Steps shows where the user is, not each step's content. Show the content for `step` yourself, and move along with `next()` and `previous()` from your own buttons, which don't dispatch "change". Setting `step` past the last Step makes every one complete, for when the task is done.

With `navigable`, each Step is a `<button>`, and clicking one sets `step` and dispatches "change". Set `disabled` on the Steps the user can't go to yet, such as those after the current one in a form that has to be filled in order. Without `navigable`, nothing in it is interactive.

The current Step has `aria-current="step"`, and each complete one has `complete-label` ("Completed" unless you set it) after its label, hidden visually, so screenreaders can tell it from an upcoming one. The number is hidden from them, since they read the list's own. A design's checkmark or color goes on `:state(complete)`, `:state(current)` and `:state(upcoming)`.

## Keyboard

| Key          | What it does                                                                      |
| ------------ | --------------------------------------------------------------------------------- |
| Tab          | In a `navigable` Steps, moves through the Steps' buttons, skipping disabled ones. |
| Enter, Space | On a Step's button, goes to that Step.                                            |

## Behavior

### `<slab-steps>`

Steps with no visual styles: where the user is in a task of several steps, such as a checkout or a setup wizard, as an `<ol>` of Steps.

Each Step gets an `<li>` of its own, as each link in a Breadcrumb does. The Steps before `step` are complete, the one at it is current and has `aria-current="step"`, and the rest are upcoming. Past the last Step, all of them are complete. A complete Step says so to screenreaders with `complete-label`, which is hidden visually.

Steps shows where the user is, not the steps' content. Show the content for `step` yourself, and call `next()` and `previous()` from your own buttons.

With `navigable`, each Step is a `<button>`, and clicking one sets `step` and dispatches "change". Disable the Steps the user can't go to yet, such as those after the current one in a form that has to be filled in order. Without it, nothing in Steps is interactive.

Style it through its parts, and each Step through its parts and `:state(complete)`, `:state(current)` and `:state(upcoming)`.

### `<slab-steps-step>`

A Step with no visual styles: one step of its Steps, with a number, a label and an optional description.

Its Steps numbers it and tells it whether it's complete, current or upcoming. The current one has `aria-current="step"`, and a complete one has its Steps' `complete-label` after its label, hidden visually, so screenreaders say so. The number is hidden from screenreaders, which read the list's own.

In a `navigable` Steps, `::part(step)` is a `<button>`, and clicking it goes to the Step. Set `disabled` on Steps the user can't go to yet.

Style it through its parts and `:state(complete)`, `:state(current)`, `:state(upcoming)` and, in a `navigable` Steps, `:state(navigable)`.

## API

### `<slab-steps>`

#### Attributes

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `label` (required) | `string` |  | Names the list. |
| `complete-label` | `string` |  | Read by screenreaders after each complete Step's label. "Completed" in English when unset. |
| `navigable` | `boolean` | `false` | Makes each Step a button that goes to it. |
| `step` | `number` | `1` | The current Step, from 1. The Steps before it are complete. |

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| `steps` (read-only) | `Step[]` | Its Steps, in order. |

#### Methods

| Signature | Description |
| --- | --- |
| `next(): void` | Goes to the next Step, or past the last one, where every Step is complete. It doesn't dispatch "change", which is only for the user's clicks. |
| `previous(): void` | Goes to the previous Step, stopping at the first. It doesn't dispatch "change", which is only for the user's clicks. |

#### Events

| Name | Type | Description |
| --- | --- | --- |
| `change` | `Event` | When the user goes to another Step. Setting `step`, `next()` and `previous()` don't dispatch it. |

#### Slots

| Name | Type | Description |
| --- | --- | --- |
| `(default)` | `Step` | The Steps, in order |

#### CSS parts

| Name | Description |
| --- | --- |
| `item` | Each Step's list item |
| `list` | The Steps |

### `<slab-steps-step>`

#### Attributes

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `disabled` | `boolean` | `false` | Keeps the user from going to it in a `navigable` Steps. |

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| `completeLabel` | `string` | Set by its Steps. |
| `index` | `number` | Its position, from 1. Set by its Steps. |
| `navigable` | `boolean` | Set by its Steps. |
| `status` | `'complete' \| 'current' \| 'upcoming'` | Set by its Steps. |

#### Slots

| Name | Type | Description |
| --- | --- | --- |
| `description` | `Element \| string` | Shown below the label |
| `(default)` | `Element \| string` | The label |

#### CSS parts

| Name | Description |
| --- | --- |
| `description` | Holds the description |
| `indicator` | The Step's number, hidden from screenreaders |
| `label` | Holds the label |
| `status` | Its Steps' complete label, hidden visually, on a complete Step |
| `step` | The number, label and status. A button when its Steps is navigable. |

#### CSS states

| Name | Description |
| --- | --- |
| `:state(complete)` | While its `status` is "complete". |
| `:state(current)` | While its `status` is "current". |
| `:state(disabled)` | While it's disabled. |
| `:state(navigable)` | While its Steps is `navigable`, so it can be moved to. |
| `:state(upcoming)` | While its `status` is "upcoming". |

## Copy and own it

`<slab-styled-steps>` isn't in the package. It's an example — copy it into your project and change whatever you want. Keyboard, focus, ARIA, forms, and events all come from the headless element, and the styles only reach in through `::part()` and `:state()`, same as yours would.

### Lit

Under the hood, it's just the headless element, subclassed, with `styles` set. That's it. To use it, copy these files, swap the tag in `@customElement()` for one of your own, and import it. `tokens.styles.ts` holds the colors and fonts every styled example shares, so you only need it once.

#### TypeScript

These files are TypeScript, and `@customElement()` is one of Lit's decorators (TypeScript's experimental flavor). You'll need two options in your tsconfig, per [Lit's docs](https://lit.dev/docs/components/decorators/#decorators-typescript): `experimentalDecorators` to compile them, and `useDefineForClassFields` turned off so class fields don't stomp on the accessors Lit sets up.

```json
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "useDefineForClassFields": false
  }
}
```

Using plain JavaScript? Drop the types and register the class with `customElements.define()` instead of the decorator.

#### steps.ts

```ts
import { customElement } from 'lit/decorators.js';
import Steps from 'slab-elements/steps.js';
import styles from './steps.styles.js';
import tokens from './tokens.styles.js';

declare global {
  interface HTMLElementTagNameMap {
    'slab-styled-steps': StyledSteps;
  }
}

/**
 * Steps, styled: a row of Steps joined by dashed rules, which stacks into a
 * column when there isn't room for it.
 */
@customElement('slab-styled-steps')
export default class StyledSteps extends Steps {
  static override styles = [tokens, styles];
}
```

#### steps.styles.ts

```ts
import { css } from 'lit';

/*
  Each Step draws the rule after it, since it knows whether it's complete. The
  row stacks into a column when there isn't room for it, which Steps' own
  Steps query too.
*/
export default css`
  :host {
    container-type: inline-size;
  }

  [part~='list'] {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  [part~='item'] {
    flex: 1 1 0;
    min-inline-size: 0;
  }

  @container (inline-size < 36rem) {
    [part~='list'] {
      flex-direction: column;
      gap: 0.25rem;
    }
  }
`;
```

#### steps.step.ts

```ts
import { customElement } from 'lit/decorators.js';
import Step from 'slab-elements/steps.step.js';
import styles from './steps.step.styles.js';
import tokens from './tokens.styles.js';

declare global {
  interface HTMLElementTagNameMap {
    'slab-styled-steps-step': StyledStep;
  }
}

/**
 * Step, styled: a square number beside slab-serif capitals. It's ink with a
 * check once complete, ember while current, and dashed while upcoming.
 */
@customElement('slab-styled-steps-step')
export default class StyledStep extends Step {
  static override styles = [tokens, styles];
}
```

#### steps.step.styles.ts

```ts
import { css } from 'lit';

/*
  The square, the label and the rule to the next Step sit side by side in a
  grid, and the description goes below the label. When its Steps stacks into
  a column, the rule runs down from the square instead.

  "::part(step)" is a button when its Steps is navigable, so it's reset to
  look like the "<div>" it is otherwise.
*/
export default css`
  :host {
    color: var(--ink);
    column-gap: 0.75rem;
    display: grid;
    grid-template-columns: 2.5rem auto minmax(1rem, 1fr);
  }

  [part~='step'] {
    align-items: center;
    background: none;
    border: none;
    color: inherit;
    column-gap: inherit;
    display: grid;
    font: inherit;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    margin: 0;
    padding: 0;
    text-align: start;

    &::after {
      border-block-start: 2px dashed var(--ash);
      content: '';
    }

    &:focus-visible {
      outline: 3px solid var(--ember);
      outline-offset: 3px;
    }
  }

  :host(:last-child) [part~='step']::after {
    display: none;
  }

  :host(:state(complete)) [part~='step']::after {
    border-block-start: 2px solid var(--ink);
  }

  :host(:state(navigable)) [part~='step'] {
    cursor: pointer;
  }

  :host(:state(navigable)[disabled]) [part~='step'] {
    cursor: not-allowed;
  }

  :host(:state(navigable):not([disabled]):hover) [part~='label'] {
    text-decoration-color: var(--ember);
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
  }

  [part~='indicator'] {
    background-color: var(--paper);
    block-size: 2.5rem;
    border: var(--border);
    box-shadow: 3px 3px 0 var(--ink);
    box-sizing: border-box;
    display: grid;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    inline-size: 2.5rem;
    place-items: center;
  }

  [part~='label'] {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
    text-transform: uppercase;
  }

  [part~='description'] {
    color: var(--ash);
    font-family: var(--font-body);
    font-size: 0.875rem;
    grid-column: 2 / -1;
    line-height: 1.4;
  }

  /* The number gives way to a check. */
  :host(:state(complete)) [part~='indicator'] {
    background-color: var(--ink);
    color: var(--paper);
    font-size: 0;

    &::before {
      content: '✓';
      font-size: 1.25rem;
    }
  }

  /* Deep rather than plain ember, for the number's contrast. */
  :host(:state(current)) [part~='indicator'] {
    background-color: var(--ember-deep);
    color: var(--paper);
  }

  :host(:state(upcoming)) [part~='indicator'] {
    border-style: dashed;
    box-shadow: none;
    color: var(--ash);
  }

  :host(:state(upcoming)) [part~='label'] {
    color: var(--ash);
  }

  @container (inline-size < 36rem) {
    :host {
      grid-template-columns: 2.5rem minmax(0, 1fr);
    }

    [part~='step']::after {
      display: none;
    }

    /* Down from the square, past the description, to the next Step's. */
    :host(:not(:last-child))::after {
      border-inline-start: 2px dashed var(--ash);
      content: '';
      grid-column: 1;
      grid-row: 2 / span 2;
      justify-self: center;
      margin-block: 0.375rem 0.125rem;
      min-block-size: 1.5rem;
    }

    :host(:state(complete):not(:last-child))::after {
      border-inline-start: 2px solid var(--ink);
    }
  }
`;
```

#### tokens.styles.ts

```ts
import { css } from 'lit';

/*
  The styled components' palette and type, taken from the logo: ink for the
  courses, ember for the base, paper behind them.

  Each is a short alias for a "--slab-styled-*" property, with the default as
  its fallback. Retheming is "--slab-styled-ember" and the rest on ":root",
  which every shadow root inherits. Were the defaults declared under those
  names here instead, each host's own declaration would shadow the page's.

  Each default is "light-dark()", so the components follow the page's
  "color-scheme": "dark" for dark, "light" for light, and "light dark" to
  follow the operating system. Ink and paper trade places in the dark, so
  ink is always the text and paper always what's behind it. Contrast is given
  as light, then dark.
*/
export default css`
  :host {
    /* Secondary text. 6.8:1 and 6.9:1 on paper. */
    --ash: var(--slab-styled-ash, light-dark(#5e5a55, #a8a19a));
    --border: 2px solid var(--ink);

    /* Behind disabled and read-only controls, and hovered rows. */
    --chalk: var(--slab-styled-chalk, light-dark(#f4f1ec, #2b2926));

    /*
      The logo's orange, brighter in the dark. 4.25:1 and 5.2:1 on paper is
      enough for borders, fills and large text, but not always for small text,
      which takes "--ember-deep".
    */
    --ember: var(--slab-styled-ember, light-dark(#d9492a, #ec5f3b));

    /*
      Orange for small text on paper, and for paper text on it. 5.7:1 and
      7.4:1.
    */
    --ember-deep: var(--slab-styled-ember-deep, light-dark(#b3381a, #ff8566));
    --font-body: var(
      --slab-styled-font-body,
      'IBM Plex Sans',
      system-ui,
      sans-serif
    );
    --font-display: var(
      --slab-styled-font-display,
      'Zilla Slab',
      rockwell,
      'Roboto Slab',
      serif
    );
    --font-mono: var(
      --slab-styled-font-mono,
      'IBM Plex Mono',
      ui-monospace,
      monospace
    );
    --ink: var(--slab-styled-ink, light-dark(#1c1c1c, #f4f1ec));
    --paper: var(--slab-styled-paper, light-dark(#fff, #1a1918));

    /* The hard, offset shadow a raised surface casts. */
    --shadow: 4px 4px 0 var(--ink);
  }

  /*
    Forced colors, such as Windows' contrast themes, replace every color that
    isn't a system color, so ember fills and paper marks all become the same
    background, and a checked Checkbox looks like an unchecked one. The palette
    becomes the user's system colors instead, which are kept. Ember is the
    highlight, the color of what's selected, and ember-deep, being for text and
    for paper text on it, is the text color.
  */
  @media (forced-colors: active) {
    :host {
      --ash: GrayText;
      --chalk: Canvas;
      --ember: Highlight;
      --ember-deep: CanvasText;
      --ink: CanvasText;
      --paper: Canvas;
    }
  }
`;
```

### React, Vue, Svelte and Ember

The same styles, written from outside the element, so there's nothing to subclass. The CSS styles every `<slab-steps>` on the page. Import `tokens.css`, the colors and fonts every styled example shares, once, wherever your global styles go.

In React and Vue, each component registers its headless element and imports its CSS. Use it like the element: its props are the element's attributes and properties.

In Svelte, import `steps.js` once, such as in your root layout, and use `<slab-steps>` as is. A Svelte component around it would take `slot="…"` content as its own slot and drop it.

In Ember, each component registers its headless element and imports its CSS. Use it like the element: its attributes and its content go to the element.

#### Steps.jsx

```jsx
import 'slab-elements/steps.js';
import './steps.css';
import 'slab-elements/steps.step.js';
import './steps.step.css';

export function Steps(props) {
  return <slab-steps {...props} />;
}

export function StepsStep(props) {
  return <slab-steps-step {...props} />;
}
```

#### Steps.vue

```vue
<script setup>
import 'slab-elements/steps.js';
import './steps.css';
</script>

<template>
  <slab-steps><slot /></slab-steps>
</template>
```

#### StepsStep.vue

```vue
<script setup>
import 'slab-elements/steps.step.js';
import './steps.step.css';
</script>

<template>
  <slab-steps-step><slot /></slab-steps-step>
</template>
```

#### steps.js

```js
import 'slab-elements/steps.js';
import './steps.css';
import 'slab-elements/steps.step.js';
import './steps.step.css';
```

#### Steps.gjs

```gjs
import 'slab-elements/steps.js';
import './steps.css';

export const Steps = <template>
  <slab-steps ...attributes>{{yield}}</slab-steps>
</template>;
```

#### StepsStep.gjs

```gjs
import 'slab-elements/steps.step.js';
import './steps.step.css';

export const StepsStep = <template>
  <slab-steps-step ...attributes>{{yield}}</slab-steps-step>
</template>;
```

#### steps.css

```css
slab-steps {
  container-type: inline-size;
}

slab-steps::part(list) {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

slab-steps::part(item) {
  flex: 1 1 0;
  min-inline-size: 0;
}

@container (inline-size < 36rem) {
  slab-steps::part(list) {
    flex-direction: column;
    gap: 0.25rem;
  }
}
```

#### steps.step.css

```css
slab-steps-step {
  color: var(--ink);
  column-gap: 0.75rem;
  display: grid;
  grid-template-columns: 2.5rem auto minmax(1rem, 1fr);
}

slab-steps-step::part(step) {
  align-items: center;
  background: none;
  border: none;
  color: inherit;
  column-gap: inherit;
  display: grid;
  font: inherit;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  margin: 0;
  padding: 0;
  text-align: start;
}

slab-steps-step::part(step)::after {
  border-block-start: 2px dashed var(--ash);
  content: '';
}

slab-steps-step::part(step):focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
}

slab-steps-step:last-child::part(step)::after {
  display: none;
}

slab-steps-step:state(complete)::part(step)::after {
  border-block-start: 2px solid var(--ink);
}

slab-steps-step:state(navigable)::part(step) {
  cursor: pointer;
}

slab-steps-step:state(navigable)[disabled]::part(step) {
  cursor: not-allowed;
}

slab-steps-step:state(navigable):not([disabled]):hover::part(label) {
  text-decoration-color: var(--ember);
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

slab-steps-step::part(indicator) {
  background-color: var(--paper);
  block-size: 2.5rem;
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  box-sizing: border-box;
  display: grid;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  inline-size: 2.5rem;
  place-items: center;
}

slab-steps-step::part(label) {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

slab-steps-step::part(description) {
  color: var(--ash);
  font-family: var(--font-body);
  font-size: 0.875rem;
  grid-column: 2 / -1;
  line-height: 1.4;
}

/* The number gives way to a check. */
slab-steps-step:state(complete)::part(indicator) {
  background-color: var(--ink);
  color: var(--paper);
  font-size: 0;
}

slab-steps-step:state(complete)::part(indicator)::before {
  content: '✓';
  font-size: 1.25rem;
}

/* Deep rather than plain ember, for the number's contrast. */
slab-steps-step:state(current)::part(indicator) {
  background-color: var(--ember-deep);
  color: var(--paper);
}

slab-steps-step:state(upcoming)::part(indicator) {
  border-style: dashed;
  box-shadow: none;
  color: var(--ash);
}

slab-steps-step:state(upcoming)::part(label) {
  color: var(--ash);
}

@container (inline-size < 36rem) {
  slab-steps-step {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  slab-steps-step::part(step)::after {
    display: none;
  }

  /* Down from the square, past the description, to the next Step's. */
  slab-steps-step:not(:last-child)::after {
    border-inline-start: 2px dashed var(--ash);
    content: '';
    grid-column: 1;
    grid-row: 2 / span 2;
    justify-self: center;
    margin-block: 0.375rem 0.125rem;
    min-block-size: 1.5rem;
  }

  slab-steps-step:state(complete):not(:last-child)::after {
    border-inline-start: 2px solid var(--ink);
  }
}
```

#### tokens.css

```css
:root {
  /* Secondary text. 6.8:1 and 6.9:1 on paper. */
  --ash: var(--slab-styled-ash, light-dark(#5e5a55, #a8a19a));
  --border: 2px solid var(--ink);

  /* Behind disabled and read-only controls, and hovered rows. */
  --chalk: var(--slab-styled-chalk, light-dark(#f4f1ec, #2b2926));

  /*
    The logo's orange, brighter in the dark. 4.25:1 and 5.2:1 on paper is
    enough for borders, fills and large text, but not always for small text,
    which takes "--ember-deep".
  */
  --ember: var(--slab-styled-ember, light-dark(#d9492a, #ec5f3b));

  /*
    Orange for small text on paper, and for paper text on it. 5.7:1 and
    7.4:1.
  */
  --ember-deep: var(--slab-styled-ember-deep, light-dark(#b3381a, #ff8566));
  --font-body: var(
    --slab-styled-font-body,
    'IBM Plex Sans',
    system-ui,
    sans-serif
  );
  --font-display: var(
    --slab-styled-font-display,
    'Zilla Slab',
    rockwell,
    'Roboto Slab',
    serif
  );
  --font-mono: var(
    --slab-styled-font-mono,
    'IBM Plex Mono',
    ui-monospace,
    monospace
  );
  --ink: var(--slab-styled-ink, light-dark(#1c1c1c, #f4f1ec));
  --paper: var(--slab-styled-paper, light-dark(#fff, #1a1918));

  /* The hard, offset shadow a raised surface casts. */
  --shadow: 4px 4px 0 var(--ink);
}

/*
  Forced colors, such as Windows' contrast themes, replace every color that
  isn't a system color, so ember fills and paper marks all become the same
  background, and a checked Checkbox looks like an unchecked one. The palette
  becomes the user's system colors instead, which are kept. Ember is the
  highlight, the color of what's selected, and ember-deep, being for text and
  for paper text on it, is the text color.
*/
@media (forced-colors: active) {
  :host {
    --ash: GrayText;
    --chalk: Canvas;
    --ember: Highlight;
    --ember-deep: CanvasText;
    --ink: CanvasText;
    --paper: Canvas;
  }
}
```
