Page title
The main content, which takes what is left.
# Yeti 7.0.0-alpha.1 Yeti is a plain-CSS framework. Three rules cover every component: identity is a class (`class="card"`), configuration is a `data-*` attribute with a fixed value list (`data-gap="md"`), and state is native or ARIA (`open`, `aria-current`), never a class. Layouts arrange, recipes compose layouts, components are styled things. Every attribute below is validated: a value not in its list is an error. Rendered pages are checked with the same manifest by bin/validate-html.js in the Yeti repository (node bin/validate-html.js
Body
Readable.
Readable again.
The main text carries the argument.
What the button adds to.
Shown once this column is 32rem or wider.
Gone once this column is 32rem or wider.
One paragraph.
Another, at the stack's gap.
And its paragraph, back at the stack's gap.
Started.
Shipped.
Fifteen layouts, one attribute vocabulary, no breakpoints.
Get started
Fifteen layouts, one attribute vocabulary, no breakpoints.
Get started
Cancel whenever you like.
Two months free.
| Feature | Free | Walker |
|---|---|---|
| Offline maps | No | Yes |
| Region | Q1 | Q2 |
|---|---|---|
| North | 120 | 132 |
Summary panel.
Detail panel.
General settings.
Your API keys.
Card declined
``` ### How it works One run of one animation, over `--yeti-attention-duration`. `pulse` swells the element to `--yeti-attention-scale` at the halfway point and settles back; the peak is in the middle so the gesture is symmetrical, since something that grows and snaps back reads as a twitch. `shake` throws it `--yeti-attention-distance` to each side and back twice, because a single sideways move is a slide and it takes the return trip to read as a shake. It runs once, and the iteration count is deliberately left at the initial `1` rather than reading `--yeti-motion-iterations`, which exists for the animations that never end. A gesture that keeps repeating stops being a moment that has passed and becomes a state the page is in, and the reader has no way to dismiss it. No keyframe leaves the element anywhere but where it started, so no fill mode is needed and nothing here can strand an element off its mark. ### Accessibility Motion is not an announcement. A screen reader hears nothing at all here, so a change worth pointing at is a change worth saying: put the element in a live region, or give it `role="status"`, and the gesture becomes the visual half of something that is already spoken. Under reduced motion `--yeti-attention-duration` collapses and the element simply sits still, which is the whole of the accommodation — there is nothing left to see, and the live region is still heard. Tokens: - --yeti-attention-duration — How long the gesture takes; reduced motion collapses it. - --yeti-attention-distance — How far a shake throws the element to each side. - --yeti-attention-scale — How large a pulse swells the element at its peak. - --yeti-ease — The easing of the gesture. Accessibility contract: Motion is not an announcement. A change worth pointing at is worth saying, so put the element in a live region, or give it role="status", and the gesture becomes the visual half of something a screen reader already hears. It plays once and never repeats, so nothing here keeps moving under a reader who cannot dismiss it, and under reduced motion the duration collapses and the element simply sits still. ## billboard (utility, class="billboard") Sizes display text to the container it is in, clamped between two steps of the type scale, so a headline fills the board it is on. Attributes: - data-fit: xs-sm | xs-md | xs-lg | xs-xl | xs-2xl | xs-3xl | xs-display | sm-md | sm-lg | sm-xl | sm-2xl | sm-3xl | sm-display | md-lg | md-xl | md-2xl | md-3xl (default) | md-display | lg-xl | lg-2xl | lg-3xl | lg-display | xl-2xl | xl-3xl | xl-display | 2xl-3xl | 2xl-display | 3xl-display — The two ends of the clamp, as a pair of type steps: the smallest the line may set and the largest. ### When to use it Display text: a hero's headline, a figure's number, a pull quote, the title on a card that is sometimes a column and sometimes a page. A billboard is sized to fill the board it is on and to be read from wherever the reader is standing, and the default pair says so — it runs from `md` to `3xl`, the top of the everyday scale. Not body copy. Prose has a measure and a comfortable size, and neither of them is a percentage of a column. ### How it works `font-size` reads `cqi`, one percent of the container's inline size, so the line is sized by the box it is in rather than by the window. The same heading is one size in a card and another across a page, on the same page, which no viewport unit can say. It shrinks as readily as it grows: a billboard in a narrow column comes down to the bottom of its pair, which with the default is body size, not nothing. `data-fit` is a pair of steps from the type scale, `A bordered surface for one thing.
One thing in a box: an article in a listing, a product, a person, a plan.
``` ### Accessibility Nothing to do. A lede is a paragraph that is set larger; it takes no role and announces nothing of its own, which is correct, because the sentence is ordinary prose and its position already says what it is. Tokens: - --yeti-lede-size — How large a lede reads. - --yeti-lede-measure — The lede's line length; moves with its size, since ch is a unit of the font. - --yeti-leading-md — Its line height, the same as body prose. Accessibility contract: A lede takes no role and announces nothing of its own. It is ordinary prose set larger, and its position under the heading already says what it is. ## lift (utility, class="lift") Raises the element slightly, or grows it a little, and deepens its shadow while the pointer is on it or a keyboard is inside it. Attributes: - data-lift: rise (default) | scale — Which gesture: rise by --yeti-lift-distance, or scale by --yeti-lift-scale, for a tile in a row where a rise would break the line. ### When to use it On something that can be pressed and is big enough for the movement to read: a card that is a link, a tile in a grid of choices, a panel that opens something. On a button it is noise — a button already has a pressed and a hovered state — and on a paragraph it is a lie, because nothing happens when you click it. ```htmlfor Websites
Printed from https://foundationcss.com/guides/visibility
``` Something the screen needs and the paper does not: a share button, a video, a "back to top" link, a cookie banner, a nav bar. Give those `data-print="none"`. ```html ``` ### How it works Two rules in two media queries. `only`, which is what you get when the attribute is absent, hides the element everywhere but the printed page; `none` hides it on the printed page and nowhere else. Both use `display: none`, and both sit in the utilities layer, which is last in Yeti's cascade order, so a component's own `display` does not win: a `button` really does come off the page. This is the one place in Yeti where a media query is the right tool. Every width in the framework is a container query, because a rule that switches on the window breaks the moment its element moves into a narrower box. A medium is not a width — no container is ever printed at a different medium from the page around it — so there is no box to measure here and nothing a container query could say. Print styling stops there. Yeti does not set page margins, force a color scheme, or break pages for you; `@page`, `break-inside` and the rest are yours to write, and this utility is only about which elements are on the sheet at all. ### Accessibility Both states are `display: none` in the medium they are not for, which takes the element out of the accessibility tree there too. That is the right behaviour for this job, and it has two consequences worth stating. A paper-only line is not announced on screen. Never put anything a screen reader needs into one — an address a sighted reader can also see is fine, a warning is not. Text that should be heard and not seen is [visually-hidden](visually-hidden.md), which is a different tool for a different question; the [visibility guide](guides/visibility.md) has both side by side. A screen-only control is not on the page a reader prints. Nothing on paper may depend on it, so a form whose only submit button carries `data-print="none"` has printed a form nobody can return. `print` and `visually-hidden` do not combine on one element: on screen `print` removes it outright, so there is nothing left for `visually-hidden` to keep announced, and on paper the clip `visually-hidden` applies leaves a blank pixel where the printed content should be. Accessibility contract: Both states are display: none in the medium they are not for, which takes the element out of the accessibility tree there as well. That is correct for this job and worth saying out loud: a paper-only line is not read out on screen, so it must never carry anything a reader on screen needs, and a screen-only control is not on the page a reader prints, so nothing on paper may depend on it. Text a screen reader should hear but nobody should see is visually-hidden, not this. A printed page is also a page with no color guarantee, so never let the print state be the only thing carrying a meaning. ## visually-hidden (utility, class="visually-hidden") Takes words out of sight and leaves them in the accessibility tree, for the name a control needs when its face is a picture. ### When to use it Words a screen reader needs and the page has no room for: the name of an icon-only button, the number on a carousel dot, the subject of the third "Read more" link on a page. It is not the `hidden` attribute, and the difference is the whole point — it is also why this is the one class in Yeti with two words in its name. `hidden` takes the element out of the page and out of the accessibility tree with it, so a reader hears nothing. This class takes it out of sight and leaves it in the tree, so a reader hears everything. The [visibility guide](guides/visibility.md) has both, and the ten other ways to hide something, on one page. ```html Read more about the trail map ``` ### How it works The old clip-rect recipe, with `clip-path` in place of the deprecated `clip` property. The box is taken out of the flow with `position: absolute`, so it cannot open a gap in the line it sits in; it is sized a pixel square, because some engines drop a zero-size box altogether; and it is clipped to nothing with `clip-path: inset(50%)` and `overflow: hidden`. `white-space: nowrap` stops a long string being wrapped into a one-character column, which some screen readers read out letter by letter. `display: none` and `visibility: hidden` are both shorter, and both do the one thing this must not: they take the text out of the accessibility tree. Put only text in here. Everything inside is still in the page, so a link or a button inside would take Tab focus with nothing on screen to show for it, which is worse than either showing it or leaving it out. ### Accessibility The text is announced in source order and becomes part of the accessible name of whatever contains it, which is what makes a button with a picture on its face and a word inside it a named button. A control is named once. Where an `aria-label` is present the browser uses that and ignores the text inside, so pick one: the label when the name is a rewording of the content, the hidden text when the name *is* the content and the design has no room for it. It is a tool of last resort. A control with room for a word should have the word. Accessibility contract: This is the opposite of the hidden attribute, which removes the element from the accessibility tree as well: text carrying this class is still announced, in source order, and becomes part of the accessible name of whatever contains it. The two words in the name are there to keep the two apart. A control named twice is named once: where an aria-label is present the browser uses it and ignores the text inside, so use one or the other. Put only text in here. Anything focusable is still focusable and would take Tab focus with nothing on screen to show for it. ## Tokens Every public custom property, with its group and default. A theme is a file that sets some of these after yeti.css. - --yeti-base (scale): unset — Set to pin the body size at one value for every viewport; overrides both --yeti-base-min and --yeti-base-max. - --yeti-ratio (scale): unset — Set to pin the scale ratio at one value for every viewport; overrides both --yeti-ratio-min and --yeti-ratio-max. - --yeti-base-min (scale): 1rem — Body text size at the narrow viewport. - --yeti-base-max (scale): 1.125rem — Body text size at the wide viewport. - --yeti-ratio-min (scale): 1.2 — Scale ratio at the narrow viewport (minor third). - --yeti-ratio-max (scale): 1.333 — Scale ratio at the wide viewport (perfect fourth). - --yeti-viewport-min (scale): 320px — Viewport width at which the narrow values apply. - --yeti-viewport-max (scale): 1280px — Viewport width at which the wide values apply. - --yeti-space-none (space): 0 — No space; the value behind data-gap="none". - --yeti-space-xs (space): step -2 — Hairline gap. - --yeti-space-sm (space): step -1 — Tight gap. - --yeti-space-md (space): step 0 — Default gap; equals the body text size. - --yeti-space-lg (space): step 1 — Comfortable gap. - --yeti-space-ratio (space): 2 — How much each space stop above lg grows on the one before; xl is base × ratio, 4xl is base × ratio⁴. Keep it above --yeti-ratio-max so xl stays larger than lg. - --yeti-space-xl (space): base × space-ratio — Section gap; twice the body size. - --yeti-space-2xl (space): base × space-ratio² — Page-level gap; four bodies. - --yeti-space-3xl (space): base × space-ratio³ — Hero-level gap; eight bodies. - --yeti-space-4xl (space): base × space-ratio⁴ — The biggest room: sixteen bodies, the gap between a page's great sections. - --yeti-space-xs-static (space): step -2, narrow viewport value — Non-fluid xs, for a gap that must not scale. - --yeti-space-sm-static (space): step -1, narrow viewport value — Non-fluid sm. - --yeti-space-md-static (space): step 0, narrow viewport value — Non-fluid md. - --yeti-space-lg-static (space): step 1, narrow viewport value — Non-fluid lg. - --yeti-space-xl-static (space): narrow base × space-ratio — Non-fluid xl. - --yeti-space-2xl-static (space): narrow base × space-ratio² — Non-fluid 2xl. - --yeti-space-3xl-static (space): narrow base × space-ratio³ — Non-fluid 3xl. - --yeti-space-4xl-static (space): narrow base × space-ratio⁴ — Non-fluid 4xl. - --yeti-radius-sm (radius): 0.25 × base — Small corner radius; inputs, code, badges. - --yeti-radius-md (radius): 0.5 × base — Medium corner radius; cards, dialogs. - --yeti-radius-lg (radius): 1 × base — Large corner radius; hero panels. - --yeti-radius-full (radius): 9999px — Pill or circle. - --yeti-width-3xs (width): 8rem — The narrowest named width: two of them fit a phone, so a grid of links, badges or small pictures at data-min="3xs" is two abreast where 2xs gives one. - --yeti-width-2xs (width): 12rem — The narrowest named width: three of them fit a reading column, which sixteen rem does not. - --yeti-width-xs (width): 16rem — Smallest container measure; the grid's default minimum column width. - --yeti-width-sm (width): 24rem — The sidebar's default width. - --yeti-width-md (width): 32rem — The columns layout's default threshold. - --yeti-width-lg (width): 48rem — A narrow page column. - --yeti-width-xl (width): 64rem — The center layout's default maximum. - --yeti-width-2xl (width): 80rem — A wide page column. - --yeti-height-sm (height): 12rem — Block size at data-height="sm"; the demo's preview box is the first taker. - --yeti-height-md (height): 20rem — Block size at data-height="md", and with no attribute. - --yeti-height-lg (height): 32rem — Block size at data-height="lg". - --yeti-height-xl (height): 48rem — Block size at data-height="xl". - --yeti-height-half (height): 50dvh — Block size at data-height="half": half the viewport, dynamic so it tracks the browser chrome on phones. - --yeti-text-xs (text): step -2 — Captions and fine print. - --yeti-text-sm (text): step -1 — Small text; h6. - --yeti-text-md (text): step 0 — Body text; h5 in bold. - --yeti-text-lg (text): step 1 — Lead paragraphs; h4. - --yeti-text-xl (text): step 2 — h3. - --yeti-text-2xl (text): step 3 — h2. - --yeti-text-3xl (text): step 4 — h1. - --yeti-text-display (text): step 5 — Display type, larger than any heading. - --yeti-leading-md (text): 1em + 0.5 × base — Body line height; about 1.5 at body size, tightening as type grows. - --yeti-leading-sm (text): 1.5 — Line height for text set below the body size, such as a code block; a ratio, so it shrinks with the type. - --yeti-leading-tight (text): 1.15 — Heading line height. - --yeti-measure (text): 70ch — Maximum line length for prose. - --yeti-list-gap (text): 0.25rem — Space between one item of a prose list and the next. - --yeti-heading-space-before (text): var(--yeti-space-xl) — Space above a section heading (h2, h3) in flow, from what comes before it. Read by base flow and by breakout. - --yeti-heading-space-after (text): var(--yeti-space-sm) — Space between any heading in flow and what it opens. Read by base flow and by breakout. - --yeti-lede-size (text): var(--yeti-text-lg) — How large a lede reads. - --yeti-lede-measure (text): 50ch — A lede's line length. Moves with --yeti-lede-size, since ch is a unit of the font. - --yeti-font-sans (font): system-ui, sans-serif — Default text face. Yeti ships no web fonts; override this to use yours. - --yeti-font-mono (font): ui-monospace, monospace — Code face. - --yeti-font-heading (font): var(--yeti-font-sans) — Heading face, every level. The text face until a theme sets a second family; one token instead of six selector overrides. - --yeti-stretch-text (font): normal — font-stretch of the body: the width axis of a variable font, as a keyword or a percentage. - --yeti-stretch-heading (font): normal — font-stretch of the headings, set apart from the text so a theme can pair narrow text with a wide title in one family. - --yeti-stretch-small (font): var(--yeti-stretch-text) — font-stretch of small lettering: captions, small print, a nav's links, a badge. The text width unless a theme narrows it. - --yeti-tracking-heading (text): normal — letter-spacing of every heading level and the billboard. Set in em so a large heading tightens more than a small one; a page may set it on one level. - --yeti-duration-fast (motion): 150ms — Quick transitions; hover and focus. Collapses to 0.01ms under prefers-reduced-motion. - --yeti-duration-base (motion): 250ms — Standard transitions; open and close. Collapses under prefers-reduced-motion. - --yeti-ease (motion): cubic-bezier(0.2, 0, 0, 1) — Default easing; fast out, gentle in. - --yeti-motion-iterations (motion): infinite — Iteration count for animations that run forever, such as the spinner. Collapses to 1 under prefers-reduced-motion, because a component's own infinite would outrank the reset and keep running at a random phase every frame. - --yeti-page-duration (motion): 200ms — How long the crossfade between two pages takes, for a site that has turned cross-document view transitions on. Collapses to 0.01ms under prefers-reduced-motion, which is the only thing that stills a page transition. - --yeti-page-ease (motion): ease — The curve that crossfade runs on. Symmetric, unlike --yeti-ease, because neither end of a page change leads. - --yeti-hue-primary (hue): 250 — Brand hue in oklch degrees; 250 is blue. Every primary color derives from it. - --yeti-hue-secondary (hue): 300 — Secondary hue; 300 is violet. - --yeti-hue-success (hue): 145 — Success hue; 145 is green. - --yeti-hue-warning (hue): 80 — Warning hue; 80 is amber. - --yeti-hue-alert (hue): 25 — Alert hue; 25 is red. - --yeti-hue-neutral (hue): var(--yeti-hue-primary) — Hue that faintly tints surfaces, text, and borders. Follows the primary hue unless set. - --yeti-chroma (hue): 0.15 — Accent saturation. Lower for a calmer palette; 0.2 and above may clip on very saturated hues. - --yeti-color-primary (color): ladder base of the primary hue — The brand color: buttons, links, focus. - --yeti-color-primary-subtle (color): ladder subtle — Tinted background; hover on surfaces, selection. - --yeti-color-primary-soft (color): ladder soft — Borders and dividers in the primary hue. - --yeti-color-primary-strong (color): ladder strong — Hover and active state of the primary color. - --yeti-color-primary-text (color): ladder text — Primary-hued text on plain surfaces. - --yeti-on-primary (color): near-white in light, near-black in dark — Text placed on --yeti-color-primary. - --yeti-color-secondary (color): ladder base of the secondary hue — Secondary accent. - --yeti-color-secondary-subtle (color): ladder subtle — Tinted background in the secondary hue. - --yeti-color-secondary-soft (color): ladder soft — Borders in the secondary hue. - --yeti-color-secondary-strong (color): ladder strong — Hover and active state of the secondary color. - --yeti-color-secondary-text (color): ladder text — Secondary-hued text on plain surfaces. - --yeti-on-secondary (color): near-white in light, near-black in dark — Text placed on --yeti-color-secondary. - --yeti-color-success (color): ladder base of the success hue — Positive state. - --yeti-color-success-subtle (color): ladder subtle — Tinted background for success messages. - --yeti-color-success-soft (color): ladder soft — Borders for success messages. - --yeti-color-success-strong (color): ladder strong — Hover and active state of the success color. - --yeti-color-success-text (color): ladder text — Success-hued text on plain surfaces. - --yeti-on-success (color): near-white in light, near-black in dark — Text placed on --yeti-color-success. - --yeti-color-warning (color): ladder base of the warning hue — Caution state. - --yeti-color-warning-subtle (color): ladder subtle — Tinted background for warnings. - --yeti-color-warning-soft (color): ladder soft — Borders for warnings. - --yeti-color-warning-strong (color): ladder strong — Hover and active state of the warning color. - --yeti-color-warning-text (color): ladder text — Warning-hued text on plain surfaces. - --yeti-on-warning (color): near-white in light, near-black in dark — Text placed on --yeti-color-warning. - --yeti-color-alert (color): ladder base of the alert hue — Error and danger state. - --yeti-color-alert-subtle (color): ladder subtle — Tinted background for errors. - --yeti-color-alert-soft (color): ladder soft — Borders for errors. - --yeti-color-alert-strong (color): ladder strong — Hover and active state of the alert color. - --yeti-color-alert-text (color): ladder text — Alert-hued text on plain surfaces. - --yeti-on-alert (color): near-white in light, near-black in dark — Text placed on --yeti-color-alert. - --yeti-color-neutral-subtle (color): ladder subtle — Neutral tint for badges and quiet fills. - --yeti-color-neutral-soft (color): ladder soft — Neutral fill for hover states. - --yeti-color-neutral (color): ladder base — Neutral accent: buttons and badges with data-variant="neutral". - --yeti-color-neutral-strong (color): ladder strong — Neutral accent, one step darker: hover and pressed. - --yeti-color-neutral-text (color): ladder text — Neutral-hued text on plain surfaces. - --yeti-on-neutral (color): near-white in light, near-black in dark — Text placed on --yeti-color-neutral. - --yeti-color-surface (color): L 0.99 light, 0.13 dark — Page background. - --yeti-color-surface-raised (color): L 0.97 light, 0.17 dark — Cards, code blocks, anything sitting on the page. - --yeti-color-surface-sunken (color): L 0.94 light, 0.10 dark — Wells and inset areas. - --yeti-color-text (color): L 0.15 light, 0.93 dark — Body text. - --yeti-color-text-muted (color): L 0.45 light, 0.70 dark — Secondary text: captions, help, metadata. - --yeti-color-border (color): L 0.88 light, 0.30 dark — Default border and divider. - --yeti-color-border-strong (color): L 0.75 light, 0.40 dark — Emphasised border: focused inputs, blockquote rule. - --yeti-color-scrim (color): the surface at 85% — A wash over content so something on top of it can be read: a caption over a picture, a veil over a form. Thinned surface, so it dims with the theme rather than tinting. - --yeti-color-focus (color): var(--yeti-color-primary) — Focus ring color. - --yeti-link-color (color): var(--yeti-color-primary) — Text color of a link at rest. Read with a fallback, so a section's own primary still colors its links. A theme whose primary is too light to read as text points this at the hue's text step, --yeti-color-primary-text. - --yeti-link-color-hover (color): var(--yeti-color-primary-strong) — Text color of a link under the pointer. Read with a fallback, so a section's own primary still colors its links. - --yeti-cover-height (layout): 100dvh — Minimum block size of a cover layout or a filled stack. Set to auto for one that is only as tall as its content. - --yeti-sticky-offset (layout): var(--yeti-space-md) — How far from the leading edge of the scrollport a child carrying data-sticky stops. Set it to a sticky bar's height on whatever holds the things that stick below it. - --yeti-scroll-padding (layout): var(--yeti-sticky-offset) — Where a scroll-into-view stops below the top edge: a fragment jump, scrollIntoView, a focused control. The sticky offset by default; set it alone for more room above a jumped-to heading than the things that stick need. Root-level: it is read by the root's scroll padding. - --yeti-border-width (border): 1px — Width of every border a component draws. - --yeti-weight-normal (weight): 400 — Body weight. - --yeti-weight-bold (weight): 700 — th, strong, b and, through --yeti-weight-heading, the headings. Separate from --yeti-weight-strong so display text and control labels can be tuned apart. - --yeti-weight-heading (weight): var(--yeti-weight-bold) — The headings' own weight, bold unless a theme sets it: a display face often wants 500 or 800 where strong text stays at 700. - --yeti-weight-strong (weight): 600 — Labels, headers, buttons. - --yeti-shadow-color (shadow): black at 14% in light, 55% in dark — The color every shadow is drawn in; a theme changes offsets without losing the scheme flip. - --yeti-shadow-sm (shadow): 0 1px 2px (black at 14% light, 55% dark) — Raised cards. - --yeti-shadow-md (shadow): 0 4px 12px (the same color) — Floating surfaces; phase 4's menus and dialogs. - --yeti-control-size (control): 2.5rem — Minimum block size of a button or input at data-size="md". - --yeti-control-radius (control): var(--yeti-radius-sm) — Corner of inputs. - --yeti-control-border (control): var(--yeti-color-border) — Border of inputs at rest. - --yeti-control-surface (control): var(--yeti-color-surface) — Background of inputs. - --yeti-control-chevron (control): a mid-grey chevron — The select's chevron image; a theme may supply its own, for example a lighter one for a dark control surface. - --yeti-opacity-muted (control): 0.6 — Opacity of a disabled or busy control. - --yeti-button-radius (button): var(--yeti-radius-md) — Corner of buttons. - --yeti-button-weight (button): var(--yeti-weight-strong) — Weight of button text. - --yeti-button-padding (button): 2 — Inline padding as a multiple of the size's space step. - --yeti-button-padding-block (button): 0.25 — Block padding as a multiple of the size's space step. The control height still sets the minimum, so this shows on a wrapped label, and a theme raises it for roomier buttons. - --yeti-badge-radius (badge): var(--yeti-radius-full) — Corner of badges; full makes a pill. - --yeti-badge-weight (badge): var(--yeti-weight-strong) — Weight of badge text. - --yeti-card-radius (card): var(--yeti-radius-md) — Corner of cards. - --yeti-card-padding (card): var(--yeti-space-md) — Padding inside a card. - --yeti-card-gap (card): var(--yeti-space-sm) — Space between a card's parts. - --yeti-card-border (card): var(--yeti-color-border) — Border of cards; transparent when raised. - --yeti-card-surface (card): var(--yeti-color-surface-raised) — Background of cards. - --yeti-field-gap (field): var(--yeti-space-xs) — Space between a field's label, control, and hint. - --yeti-switch-track (field): var(--yeti-control-border) — Fill and border of an off switch's track. Keep it 3:1 against the page surface. - --yeti-switch-thumb (field): var(--yeti-control-surface) — The thumb of an off switch. - --yeti-table-stripe (table): var(--yeti-color-surface-sunken) — Fill of even rows with data-striped. - --yeti-table-border (table): var(--yeti-color-border) — Row and cell borders. - --yeti-seam-size (seam): twice the size's space step — Depth of the cut; set it to fix the depth for every size. - --yeti-nav-padding (nav): var(--yeti-space-sm) var(--yeti-space-md) — Padding of the bar and of the open panel. - --yeti-nav-radius (nav): var(--yeti-radius-sm) — Corner of the links and the toggle. - --yeti-nav-border (nav): var(--yeti-color-border) — The bar's bottom edge, and the sheet's. - --yeti-nav-surface (nav): var(--yeti-color-surface) — Background of the bar. - --yeti-nav-panel (nav): var(--yeti-color-surface-raised) — Background of the open panel. - --yeti-nav-brand-weight (nav): var(--yeti-weight-strong) — Weight of the nav's brand. - --yeti-nav-brand-size (nav): 1em — Size of the nav's brand; 1em is the bar's own size. - --yeti-nav-logo-size (nav): var(--yeti-control-size) — Height of a logo in the nav's brand; its width follows the image. - --yeti-nav-link (nav): currentColor — Color of a plain link in the bar; the bar's own color unless set. The current link and a hovered link keep the variant's tints, and the open panel resets it to its own text color. - --yeti-breadcrumbs-separator (breadcrumbs): "/" — The string between crumbs; a theme may prefer "›". - --yeti-pagination-radius (pagination): var(--yeti-radius-md) — Corner of each page target. - --yeti-alert-radius (alert): var(--yeti-radius-md) — Corner of an alert. - --yeti-alert-padding (alert): var(--yeti-space-md) — Padding inside an alert. - --yeti-alert-edge (alert): four times the local border width — Width of an alert's start edge, at every emphasis. Read with a fallback to four times --yeti-border-width, evaluated locally, so a section with its own border width still gets four of its own; set this directly to fix the width regardless of the local border. - --yeti-progress-radius (progress): var(--yeti-radius-full) — Corner of the bar and of its value. - --yeti-progress-size (progress): half the size's space step — Thickness of the bar, a length. Read with a fallback to half the size's space step; a hairline reading bar sets 2px. - --yeti-spinner-duration (spinner): 0.8s — One turn of the ring; reduced motion stops it. - --yeti-spinner-width (spinner): 0.15em — Thickness of the ring. - --yeti-accordion-border (accordion): var(--yeti-color-border) — The line between one panel and the next, and around the set. - --yeti-accordion-padding (accordion): var(--yeti-space-md) — Padding of a summary and of its panel. - --yeti-accordion-surface (accordion): var(--yeti-color-surface) — Background of the set, and so of an open panel. - --yeti-accordion-summary (accordion): color-mix(in oklch, var(--yeti-accordion-surface) 88%, var(--yeti-color-text)) — Background of a summary row, set apart from the panel below it. Mixed toward the text color, so it darkens the row in light and lifts it in dark. - --yeti-accordion-summary-hover (accordion): color-mix(in oklch, var(--yeti-accordion-surface) 80%, var(--yeti-color-text)) — Background of a summary under the pointer, one step further from the panel than at rest. - --yeti-tabs-border (tabs): var(--yeti-color-border) — The line under the tab list. - --yeti-tabs-padding (tabs): var(--yeti-space-sm) var(--yeti-space-md) — Padding of one tab. - --yeti-dropdown-surface (dropdown): var(--yeti-color-surface-raised) — Background of the open panel. - --yeti-dropdown-radius (dropdown): var(--yeti-radius-md) — Corner of the panel. - --yeti-dropdown-padding (dropdown): var(--yeti-space-xs) — Padding around the items. - --yeti-dropdown-min (dropdown): 12rem — Least width of the panel. - --yeti-dropdown-open-delay (dropdown): 100ms — How long the pointer must rest on a data-trigger="hover" dropdown before its panel opens. Read by hover.js, so it has no effect without that module. - --yeti-dropdown-close-delay (dropdown): 200ms — How long a hover-triggered panel waits after the pointer leaves before it closes, so the gap between trigger and panel is forgiving. Read by hover.js. - --yeti-dialog-surface (dialog): var(--yeti-color-surface-raised) — Background of the dialog. - --yeti-dialog-radius (dialog): var(--yeti-radius-lg) — Corner of the dialog. - --yeti-dialog-padding (dialog): var(--yeti-space-lg) — Padding inside the dialog. - --yeti-dialog-backdrop (dialog): black at 60% — The backdrop behind an open dialog. Black rather than a theme color, because a backdrop dims what is behind it in every theme. - --yeti-tooltip-surface (tooltip): var(--yeti-color-text) — Background of the bubble, inverted so it reads over anything. - --yeti-tooltip-text (tooltip): var(--yeti-color-surface) — Text of the bubble. - --yeti-tooltip-radius (tooltip): var(--yeti-radius-sm) — Corner of the bubble. - --yeti-carousel-dot (carousel): var(--yeti-color-border-strong) — Color of a slide dot. - --yeti-carousel-dot-size (carousel): 0.75rem — Diameter of a slide dot. - --yeti-carousel-scroll (carousel): smooth, and auto under reduced motion — How the track scrolls when a dot is followed. A components-layer declaration outranks the reset, so the preference reaches the track through this token. - --yeti-toc-scroll (toc): smooth, and auto under reduced motion — How the page scrolls when a link in a toc, or an in-page link in a nav, is followed. A components-layer declaration outranks the reset, so the preference reaches the page through this token. The name keeps the toc it started with. - --yeti-toc-padding (toc): var(--yeti-space-xs) — The rows' block padding: a control's density by default, a book's contents page sets it smaller. - --yeti-toc-hover (toc): var(--_yeti-variant-subtle) — Background of a toc link under the pointer. Read with a fallback to the variant's subtle tint; set transparent for an underline-only list. - --yeti-range-value (field): 0% — The filled share of a range's track. Set it on the input, inline or from your own script, since CSS cannot read the value. Not a theme value. - --yeti-demo-border (demo): var(--yeti-color-border) — The preview box's edge. - --yeti-demo-radius (demo): var(--yeti-radius-md) — The preview box's corner, the summary's, and the stop label's. - --yeti-demo-label (demo): var(--yeti-color-surface-sunken) — Surface of the stop label naming the current width, and of the summary. - --yeti-enter-duration (enter): 600ms — How long one arrival takes. Collapses to 0.01ms under prefers-reduced-motion, which leaves the element present and still. - --yeti-enter-distance (enter): 2rem — How far below its place a rising element starts. - --yeti-enter-scale (enter): 0.94 — How small a scaling element starts. - --yeti-enter-stagger (enter): 200ms — The wait between one staggered child and the next; every child's delay is a multiple of it. Collapses to 0s under prefers-reduced-motion. - --yeti-enter-delay (enter): 0s — How long an element waits before it arrives, or a staggered run before its first child moves. Set it on one element to time that element alone. - --yeti-enter-ease (enter): var(--yeti-ease) — The curve a staggered entrance runs on. - --yeti-lift-distance (lift): 0.25rem — How far the element rises under the pointer. Collapses to 0 under prefers-reduced-motion, so the hover keeps its deeper shadow and loses only the movement. - --yeti-lift-scale (lift): 1.02 — How much the element grows at data-lift="scale"; reduced motion takes it to one. - --yeti-lift-shadow (lift): var(--yeti-shadow-md) — The shadow the element casts once lifted. - --yeti-lift-duration (lift): var(--yeti-duration-fast) — How long the lift takes; a consumer tinting the same hover matches it to this. - --yeti-lift-ease (lift): var(--yeti-ease) — The curve a lift runs on. - --yeti-attention-duration (attention): 600ms — How long the one pulse or shake takes. Collapses to 0.01ms under prefers-reduced-motion. - --yeti-attention-distance (attention): 0.35rem — How far a shake throws the element to each side. - --yeti-attention-scale (attention): 1.06 — How large a pulse swells the element at its peak. - --yeti-fit-width (fit): var(--yeti-width-md) — The container width at which a line carrying billboard reaches the top of its pair; below it the size is in proportion, above it the clamp holds. - --yeti-white (color): oklch(1 0 0) — White, in both schemes and under every theme. One of the three colors that never move. - --yeti-black (color): oklch(0 0 0) — Black, in both schemes and under every theme. - --yeti-grey (color): oklch(0.565 0 0) — 18% reflectance, the photographic middle grey, in both schemes and under every theme. - --yeti-grey-0 (color): 0% from surface to text — The page surface, as the first step of the greyscale. - --yeti-grey-10 (color): 10% from surface to text — 10% of the way from the page surface to its text. Near the page in both schemes when the number is low. - --yeti-grey-20 (color): 20% from surface to text — 20% of the way from the page surface to its text. Near the page in both schemes when the number is low. - --yeti-grey-30 (color): 30% from surface to text — 30% of the way from the page surface to its text. Near the page in both schemes when the number is low. - --yeti-grey-40 (color): 40% from surface to text — 40% of the way from the page surface to its text. Near the page in both schemes when the number is low. - --yeti-grey-50 (color): 50% from surface to text — 50% of the way from the page surface to its text. Near the text in both schemes when the number is high. - --yeti-grey-60 (color): 60% from surface to text — 60% of the way from the page surface to its text. Near the text in both schemes when the number is high. - --yeti-grey-70 (color): 70% from surface to text — 70% of the way from the page surface to its text. Near the text in both schemes when the number is high. - --yeti-grey-80 (color): 80% from surface to text — 80% of the way from the page surface to its text. Near the text in both schemes when the number is high. - --yeti-grey-90 (color): 90% from surface to text — 90% of the way from the page surface to its text. Near the text in both schemes when the number is high. - --yeti-grey-100 (color): 100% from surface to text — The page text color, as the last step of the greyscale. - --yeti-color-primary-0 (color): grey-0 at the primary hue — The primary hue at the lightness of --yeti-grey-0; flips with the scheme as the grey does. - --yeti-color-primary-10 (color): grey-10 at the primary hue — The primary hue at the lightness of --yeti-grey-10; flips with the scheme as the grey does. - --yeti-color-primary-20 (color): grey-20 at the primary hue — The primary hue at the lightness of --yeti-grey-20; flips with the scheme as the grey does. - --yeti-color-primary-30 (color): grey-30 at the primary hue — The primary hue at the lightness of --yeti-grey-30; flips with the scheme as the grey does. - --yeti-color-primary-40 (color): grey-40 at the primary hue — The primary hue at the lightness of --yeti-grey-40; flips with the scheme as the grey does. - --yeti-color-primary-50 (color): grey-50 at the primary hue — The primary hue at the lightness of --yeti-grey-50; flips with the scheme as the grey does. - --yeti-color-primary-60 (color): grey-60 at the primary hue — The primary hue at the lightness of --yeti-grey-60; flips with the scheme as the grey does. - --yeti-color-primary-70 (color): grey-70 at the primary hue — The primary hue at the lightness of --yeti-grey-70; flips with the scheme as the grey does. - --yeti-color-primary-80 (color): grey-80 at the primary hue — The primary hue at the lightness of --yeti-grey-80; flips with the scheme as the grey does. - --yeti-color-primary-90 (color): grey-90 at the primary hue — The primary hue at the lightness of --yeti-grey-90; flips with the scheme as the grey does. - --yeti-color-primary-100 (color): grey-100 at the primary hue — The primary hue at the lightness of --yeti-grey-100; flips with the scheme as the grey does. - --yeti-color-secondary-0 (color): grey-0 at the secondary hue — The secondary hue at the lightness of --yeti-grey-0; flips with the scheme as the grey does. - --yeti-color-secondary-10 (color): grey-10 at the secondary hue — The secondary hue at the lightness of --yeti-grey-10; flips with the scheme as the grey does. - --yeti-color-secondary-20 (color): grey-20 at the secondary hue — The secondary hue at the lightness of --yeti-grey-20; flips with the scheme as the grey does. - --yeti-color-secondary-30 (color): grey-30 at the secondary hue — The secondary hue at the lightness of --yeti-grey-30; flips with the scheme as the grey does. - --yeti-color-secondary-40 (color): grey-40 at the secondary hue — The secondary hue at the lightness of --yeti-grey-40; flips with the scheme as the grey does. - --yeti-color-secondary-50 (color): grey-50 at the secondary hue — The secondary hue at the lightness of --yeti-grey-50; flips with the scheme as the grey does. - --yeti-color-secondary-60 (color): grey-60 at the secondary hue — The secondary hue at the lightness of --yeti-grey-60; flips with the scheme as the grey does. - --yeti-color-secondary-70 (color): grey-70 at the secondary hue — The secondary hue at the lightness of --yeti-grey-70; flips with the scheme as the grey does. - --yeti-color-secondary-80 (color): grey-80 at the secondary hue — The secondary hue at the lightness of --yeti-grey-80; flips with the scheme as the grey does. - --yeti-color-secondary-90 (color): grey-90 at the secondary hue — The secondary hue at the lightness of --yeti-grey-90; flips with the scheme as the grey does. - --yeti-color-secondary-100 (color): grey-100 at the secondary hue — The secondary hue at the lightness of --yeti-grey-100; flips with the scheme as the grey does. - --yeti-color-success-0 (color): grey-0 at the success hue — The success hue at the lightness of --yeti-grey-0; flips with the scheme as the grey does. - --yeti-color-success-10 (color): grey-10 at the success hue — The success hue at the lightness of --yeti-grey-10; flips with the scheme as the grey does. - --yeti-color-success-20 (color): grey-20 at the success hue — The success hue at the lightness of --yeti-grey-20; flips with the scheme as the grey does. - --yeti-color-success-30 (color): grey-30 at the success hue — The success hue at the lightness of --yeti-grey-30; flips with the scheme as the grey does. - --yeti-color-success-40 (color): grey-40 at the success hue — The success hue at the lightness of --yeti-grey-40; flips with the scheme as the grey does. - --yeti-color-success-50 (color): grey-50 at the success hue — The success hue at the lightness of --yeti-grey-50; flips with the scheme as the grey does. - --yeti-color-success-60 (color): grey-60 at the success hue — The success hue at the lightness of --yeti-grey-60; flips with the scheme as the grey does. - --yeti-color-success-70 (color): grey-70 at the success hue — The success hue at the lightness of --yeti-grey-70; flips with the scheme as the grey does. - --yeti-color-success-80 (color): grey-80 at the success hue — The success hue at the lightness of --yeti-grey-80; flips with the scheme as the grey does. - --yeti-color-success-90 (color): grey-90 at the success hue — The success hue at the lightness of --yeti-grey-90; flips with the scheme as the grey does. - --yeti-color-success-100 (color): grey-100 at the success hue — The success hue at the lightness of --yeti-grey-100; flips with the scheme as the grey does. - --yeti-color-warning-0 (color): grey-0 at the warning hue — The warning hue at the lightness of --yeti-grey-0; flips with the scheme as the grey does. - --yeti-color-warning-10 (color): grey-10 at the warning hue — The warning hue at the lightness of --yeti-grey-10; flips with the scheme as the grey does. - --yeti-color-warning-20 (color): grey-20 at the warning hue — The warning hue at the lightness of --yeti-grey-20; flips with the scheme as the grey does. - --yeti-color-warning-30 (color): grey-30 at the warning hue — The warning hue at the lightness of --yeti-grey-30; flips with the scheme as the grey does. - --yeti-color-warning-40 (color): grey-40 at the warning hue — The warning hue at the lightness of --yeti-grey-40; flips with the scheme as the grey does. - --yeti-color-warning-50 (color): grey-50 at the warning hue — The warning hue at the lightness of --yeti-grey-50; flips with the scheme as the grey does. - --yeti-color-warning-60 (color): grey-60 at the warning hue — The warning hue at the lightness of --yeti-grey-60; flips with the scheme as the grey does. - --yeti-color-warning-70 (color): grey-70 at the warning hue — The warning hue at the lightness of --yeti-grey-70; flips with the scheme as the grey does. - --yeti-color-warning-80 (color): grey-80 at the warning hue — The warning hue at the lightness of --yeti-grey-80; flips with the scheme as the grey does. - --yeti-color-warning-90 (color): grey-90 at the warning hue — The warning hue at the lightness of --yeti-grey-90; flips with the scheme as the grey does. - --yeti-color-warning-100 (color): grey-100 at the warning hue — The warning hue at the lightness of --yeti-grey-100; flips with the scheme as the grey does. - --yeti-color-alert-0 (color): grey-0 at the alert hue — The alert hue at the lightness of --yeti-grey-0; flips with the scheme as the grey does. - --yeti-color-alert-10 (color): grey-10 at the alert hue — The alert hue at the lightness of --yeti-grey-10; flips with the scheme as the grey does. - --yeti-color-alert-20 (color): grey-20 at the alert hue — The alert hue at the lightness of --yeti-grey-20; flips with the scheme as the grey does. - --yeti-color-alert-30 (color): grey-30 at the alert hue — The alert hue at the lightness of --yeti-grey-30; flips with the scheme as the grey does. - --yeti-color-alert-40 (color): grey-40 at the alert hue — The alert hue at the lightness of --yeti-grey-40; flips with the scheme as the grey does. - --yeti-color-alert-50 (color): grey-50 at the alert hue — The alert hue at the lightness of --yeti-grey-50; flips with the scheme as the grey does. - --yeti-color-alert-60 (color): grey-60 at the alert hue — The alert hue at the lightness of --yeti-grey-60; flips with the scheme as the grey does. - --yeti-color-alert-70 (color): grey-70 at the alert hue — The alert hue at the lightness of --yeti-grey-70; flips with the scheme as the grey does. - --yeti-color-alert-80 (color): grey-80 at the alert hue — The alert hue at the lightness of --yeti-grey-80; flips with the scheme as the grey does. - --yeti-color-alert-90 (color): grey-90 at the alert hue — The alert hue at the lightness of --yeti-grey-90; flips with the scheme as the grey does. - --yeti-color-alert-100 (color): grey-100 at the alert hue — The alert hue at the lightness of --yeti-grey-100; flips with the scheme as the grey does. - --yeti-color-neutral-0 (color): grey-0 at the neutral hue — The neutral hue at the lightness of --yeti-grey-0; flips with the scheme as the grey does. - --yeti-color-neutral-10 (color): grey-10 at the neutral hue — The neutral hue at the lightness of --yeti-grey-10; flips with the scheme as the grey does. - --yeti-color-neutral-20 (color): grey-20 at the neutral hue — The neutral hue at the lightness of --yeti-grey-20; flips with the scheme as the grey does. - --yeti-color-neutral-30 (color): grey-30 at the neutral hue — The neutral hue at the lightness of --yeti-grey-30; flips with the scheme as the grey does. - --yeti-color-neutral-40 (color): grey-40 at the neutral hue — The neutral hue at the lightness of --yeti-grey-40; flips with the scheme as the grey does. - --yeti-color-neutral-50 (color): grey-50 at the neutral hue — The neutral hue at the lightness of --yeti-grey-50; flips with the scheme as the grey does. - --yeti-color-neutral-60 (color): grey-60 at the neutral hue — The neutral hue at the lightness of --yeti-grey-60; flips with the scheme as the grey does. - --yeti-color-neutral-70 (color): grey-70 at the neutral hue — The neutral hue at the lightness of --yeti-grey-70; flips with the scheme as the grey does. - --yeti-color-neutral-80 (color): grey-80 at the neutral hue — The neutral hue at the lightness of --yeti-grey-80; flips with the scheme as the grey does. - --yeti-color-neutral-90 (color): grey-90 at the neutral hue — The neutral hue at the lightness of --yeti-grey-90; flips with the scheme as the grey does. - --yeti-color-neutral-100 (color): grey-100 at the neutral hue — The neutral hue at the lightness of --yeti-grey-100; flips with the scheme as the grey does. ## Guide: ColorColor in Yeti is six words and a distance. A hue has a name, primary or warning, and the same name means the same thing on a badge, a button, an alert and a painted section. A grey has a number, how far it sits from the page toward the page's own text, and that number means the same thing in light mode and in dark. The browser picks the scheme; Yeti keeps every pair of colors readable in both. This page is how to use it. The theming guide is how to change it.
Its words are the color made for it, and so is a link inside it. A heading, a paragraph and a link, all readable, nothing set by hand.
Past the middle of the scale the words flip to the page surface. This is grey-80, a dark panel on a light page and a pale one on a dark page.
Muted words, with no background painted at all.
Yeti is themed by setting tokens, not by editing CSS. Every public token is a custom property named `--yeti-