Slab
Slab

Form

Field

A label wired up to a control of your own. Bring any input, select, or element you like.

Element
<slab-field>
Built on
<label>

Example

Here's a styled version, <slab-styled-field>. 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. Switch to "As it ships" to see the same markup with the headless element and no CSS at all. That's your starting point.

Styled example As it ships
Field labels a control of your own, here a native select.
HTML
<slab-styled-field>
  <label>Mix strength</label>
  <select slot="control">
    <option>3,000 psi</option>
    <option selected>4,000 psi</option>
    <option>5,000 psi</option>
  </select>
  <span slot="description">Field labels a control of your own, here a native select.</span>
</slab-styled-field>
Field labels a control of your own, here a native select.
HTML
<slab-field>
  <label>Mix strength</label>
  <select slot="control">
    <option>3,000 psi</option>
    <option selected>4,000 psi</option>
    <option>5,000 psi</option>
  </select>
  <span slot="description">Field labels a control of your own, here a native select.</span>
</slab-field>

Usage

Install
pnpm add slab-elements lit
ReactLitVueSvelteEmberHTML
import 'slab-elements/field.js';

export function MyField() {
  return (
    <slab-field required>
      <label>Website</label>
      <input slot="control" type="url" />
      <span slot="description">Where people can find you.</span>
    </slab-field>
  );
}

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

import 'slab-elements/field.js';
import { html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';

@customElement('my-field')
export class MyField extends LitElement {
  render() {
    return html`
      <slab-field required>
        <label>Website</label>
        <input slot="control" type="url" />
        <span slot="description">Where people can find you.</span>
      </slab-field>
    `;
  }
}

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

<script setup>
import 'slab-elements/field.js';
</script>

<template>
  <slab-field required>
    <label>Website</label>
    <input slot="control" type="url" />
    <span slot="description">Where people can find you.</span>
  </slab-field>
</template>

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

<script>
  import 'slab-elements/field.js';
</script>

<slab-field required>
  <label>Website</label>
  <input slot="control" type="url" />
  <span slot="description">Where people can find you.</span>
</slab-field>

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

import 'slab-elements/field.js';

export const MyField = <template>
  <slab-field required>
    <label>Website</label>
    <input slot="control" type="url" />
    <span slot="description">Where people can find you.</span>
  </slab-field>
</template>;

MyField.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.

<script type="module">
  import 'slab-elements/field.js';
</script>

<slab-field required>
  <label>Website</label>
  <input slot="control" type="url" />
  <span slot="description">Where people can find you.</span>
</slab-field>

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

Behavior

A label and the control it names, with no visual styles.

Field wires the two together. Both are slotted, so they're in the same tree and no ID reference has to cross a shadow root: Field gives the control an id and points the label's for at it. A for or an id that's already set is left alone, so a consumer who wants to wire it themselves can.

The control is described by each element slotted into description, through its aria-describedby, after any IDs it already has. And error sets its aria-invalid, so a screenreader says it's invalid and reads the description that says why.

Beyond that, what Field provides is a place for each piece and custom states for what a design needs to know about them: :state(disabled), :state(error), and :state(required).

required renders nothing. A design that wants an asterisk adds one from outside, through ::part(label). Layout is the same: where the label sits relative to its control is for the styles around it, not for this class.

hide-label hides the label visually and leaves it where screenreaders and a <label for> can still reach it.

API

<slab-field>

Attributes
Name Type Default Description
disabled boolean false Matches :state(disabled), for styles. Disable the control itself too.
error boolean false Sets the control's aria-invalid, so a screenreader says it's invalid and reads the description saying why. Also matches :state(error).
hide-label boolean false Hides the label visually and leaves it as the accessible name, for a design that shows the label some other way.
required boolean false Matches :state(required), for styles such as an asterisk. Make the control itself required too.
Slots
Name Type Description
(default) Element | string
control Element The control the label names, such as an <input>. It's given an id and is described by description.
description Element | string Text that describes the control, through its aria-describedby.
CSS parts
Name Description
control The control the label names
description Text about the control, such as a hint or an error
label The label
CSS states
Name Description
:state(disabled) While disabled is set.
:state(error) While error is set.
:state(required) While required is set, for styles such as an asterisk.

Copy and own it

<slab-styled-field> 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.

ReactLitVueSvelteEmber

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

Each component registers its headless element and imports its CSS. Use it like the element: its props are the element's attributes and properties.

Field.jsx
import 'slab-elements/field.js';
import './field.css';

export function Field(props) {
  return <slab-field {...props} />;
}
field.css
slab-field {
  color: var(--ink);
  display: grid;
  font-family: var(--font-body);
}

slab-field::part(label) {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-block-end: 0.375rem;
}

slab-field:state(required)::part(label)::after {
  color: var(--ember-deep);
  content: ' *' / '';
}

slab-field::part(control) {
  display: grid;
}

slab-field > [slot='control'] {
  background-color: var(--paper);
  block-size: 3rem;
  border: var(--border);
  border-radius: 0;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  padding: 0 0.75rem;
  transition:
    border-color 100ms,
    box-shadow 100ms;
}

/* The outline is transparent rather than gone, for forced colors. */
slab-field > [slot='control']:focus-visible {
  box-shadow: 4px 4px 0 var(--ember);
  outline: 2px solid transparent;
}

slab-field:state(error) > [slot='control'] {
  border-color: var(--ember-deep);
}

slab-field:state(disabled) > [slot='control'] {
  background-color: var(--chalk);
  border-style: dashed;
  color: var(--ash);
  cursor: not-allowed;
}

slab-field::part(description) {
  color: var(--ash);
  font-size: 0.875rem;
}

slab-field > [slot='description'] {
  margin-block-start: 0.375rem;
}

slab-field:state(error)::part(description) {
  color: var(--ember-deep);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  slab-field > [slot='control'] {
    transition: none;
  }
}
tokens.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;
  }
}

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.

field.ts
import { customElement } from 'lit/decorators.js';
import Field from 'slab-elements/field.js';
import styles from './field.styles.js';
import tokens from './tokens.styles.js';

declare global {
  interface HTMLElementTagNameMap {
    'slab-styled-field': StyledField;
  }
}

/**
 * Field, styled: a slab-serif label over whatever control is slotted in,
 * which takes Text Field's look.
 */
@customElement('slab-styled-field')
export default class StyledField extends Field {
  static override styles = [tokens, styles];
}
field.styles.ts
import { css } from 'lit';

/*
  Field labels a control of the consumer's own, slotted in, so the control is
  styled through "::slotted()": Text Field's look, for an input or a select.
*/
export default css`
  :host {
    color: var(--ink);
    display: grid;
    font-family: var(--font-body);
  }

  [part~='label'] {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-block-end: 0.375rem;
  }

  :host(:state(required)) [part~='label']::after {
    color: var(--ember-deep);
    content: ' *' / '';
  }

  [part~='control'] {
    display: grid;
  }

  ::slotted([slot='control']) {
    background-color: var(--paper);
    block-size: 3rem;
    border: var(--border);
    border-radius: 0;
    box-sizing: border-box;
    color: inherit;
    font: inherit;
    padding: 0 0.75rem;
    transition:
      border-color 100ms,
      box-shadow 100ms;
  }

  /* The outline is transparent rather than gone, for forced colors. */
  ::slotted([slot='control']:focus-visible) {
    box-shadow: 4px 4px 0 var(--ember);
    outline: 2px solid transparent;
  }

  :host(:state(error)) ::slotted([slot='control']) {
    border-color: var(--ember-deep);
  }

  :host(:state(disabled)) ::slotted([slot='control']) {
    background-color: var(--chalk);
    border-style: dashed;
    color: var(--ash);
    cursor: not-allowed;
  }

  [part~='description'] {
    color: var(--ash);
    font-size: 0.875rem;
  }

  ::slotted([slot='description']) {
    margin-block-start: 0.375rem;
  }

  :host(:state(error)) [part~='description'] {
    color: var(--ember-deep);
    font-weight: 600;
  }

  @media (prefers-reduced-motion: reduce) {
    ::slotted([slot='control']) {
      transition: none;
    }
  }
`;
tokens.styles.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;
    }
  }
`;

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

Each component registers its headless element and imports its CSS. Use it like the element: its props are the element's attributes and properties.

Field.vue
<script setup>
import 'slab-elements/field.js';
import './field.css';
</script>

<template>
  <slab-field><slot /></slab-field>
</template>
field.css
slab-field {
  color: var(--ink);
  display: grid;
  font-family: var(--font-body);
}

slab-field::part(label) {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-block-end: 0.375rem;
}

slab-field:state(required)::part(label)::after {
  color: var(--ember-deep);
  content: ' *' / '';
}

slab-field::part(control) {
  display: grid;
}

slab-field > [slot='control'] {
  background-color: var(--paper);
  block-size: 3rem;
  border: var(--border);
  border-radius: 0;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  padding: 0 0.75rem;
  transition:
    border-color 100ms,
    box-shadow 100ms;
}

/* The outline is transparent rather than gone, for forced colors. */
slab-field > [slot='control']:focus-visible {
  box-shadow: 4px 4px 0 var(--ember);
  outline: 2px solid transparent;
}

slab-field:state(error) > [slot='control'] {
  border-color: var(--ember-deep);
}

slab-field:state(disabled) > [slot='control'] {
  background-color: var(--chalk);
  border-style: dashed;
  color: var(--ash);
  cursor: not-allowed;
}

slab-field::part(description) {
  color: var(--ash);
  font-size: 0.875rem;
}

slab-field > [slot='description'] {
  margin-block-start: 0.375rem;
}

slab-field:state(error)::part(description) {
  color: var(--ember-deep);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  slab-field > [slot='control'] {
    transition: none;
  }
}
tokens.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;
  }
}

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

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

field.js
import 'slab-elements/field.js';
import './field.css';
field.css
slab-field {
  color: var(--ink);
  display: grid;
  font-family: var(--font-body);
}

slab-field::part(label) {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-block-end: 0.375rem;
}

slab-field:state(required)::part(label)::after {
  color: var(--ember-deep);
  content: ' *' / '';
}

slab-field::part(control) {
  display: grid;
}

slab-field > [slot='control'] {
  background-color: var(--paper);
  block-size: 3rem;
  border: var(--border);
  border-radius: 0;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  padding: 0 0.75rem;
  transition:
    border-color 100ms,
    box-shadow 100ms;
}

/* The outline is transparent rather than gone, for forced colors. */
slab-field > [slot='control']:focus-visible {
  box-shadow: 4px 4px 0 var(--ember);
  outline: 2px solid transparent;
}

slab-field:state(error) > [slot='control'] {
  border-color: var(--ember-deep);
}

slab-field:state(disabled) > [slot='control'] {
  background-color: var(--chalk);
  border-style: dashed;
  color: var(--ash);
  cursor: not-allowed;
}

slab-field::part(description) {
  color: var(--ash);
  font-size: 0.875rem;
}

slab-field > [slot='description'] {
  margin-block-start: 0.375rem;
}

slab-field:state(error)::part(description) {
  color: var(--ember-deep);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  slab-field > [slot='control'] {
    transition: none;
  }
}
tokens.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;
  }
}

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

Each component registers its headless element and imports its CSS. Use it like the element: its attributes and its content go to the element.

Field.gjs
import 'slab-elements/field.js';
import './field.css';

export const Field = <template>
  <slab-field ...attributes>{{yield}}</slab-field>
</template>;
field.css
slab-field {
  color: var(--ink);
  display: grid;
  font-family: var(--font-body);
}

slab-field::part(label) {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-block-end: 0.375rem;
}

slab-field:state(required)::part(label)::after {
  color: var(--ember-deep);
  content: ' *' / '';
}

slab-field::part(control) {
  display: grid;
}

slab-field > [slot='control'] {
  background-color: var(--paper);
  block-size: 3rem;
  border: var(--border);
  border-radius: 0;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  padding: 0 0.75rem;
  transition:
    border-color 100ms,
    box-shadow 100ms;
}

/* The outline is transparent rather than gone, for forced colors. */
slab-field > [slot='control']:focus-visible {
  box-shadow: 4px 4px 0 var(--ember);
  outline: 2px solid transparent;
}

slab-field:state(error) > [slot='control'] {
  border-color: var(--ember-deep);
}

slab-field:state(disabled) > [slot='control'] {
  background-color: var(--chalk);
  border-style: dashed;
  color: var(--ash);
  cursor: not-allowed;
}

slab-field::part(description) {
  color: var(--ash);
  font-size: 0.875rem;
}

slab-field > [slot='description'] {
  margin-block-start: 0.375rem;
}

slab-field:state(error)::part(description) {
  color: var(--ember-deep);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  slab-field > [slot='control'] {
    transition: none;
  }
}
tokens.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;
  }
}