sveltelean
Version v0.18.0

Definition

  • Custom properties on :root in the slean.tokens layer, in oklch; component files define none.
  • Semantic tokens (--slean-bg, --slean-fg, --slean-border) read the neutral scale.
  • Swatches show package defaults; this site's controls use its own palette (Themes).
app.css, an unlayered override
/* A theme is a set of token values. Redefine them on :root to retheme every primitive. */
:root {
	--slean-primary-main: oklch(45% 0.13 150);
	--slean-primary-dark: oklch(40% 0.13 150);
	--slean-radius: 0.25rem;
	--slean-font-sans: 'IBM Plex Sans', system-ui, sans-serif;
}

Spacing

one unit and its multiples. Override --slean-spacing on :root to scale every gap and padding of the package at once.

TokenLightDark
--slean-spacing0.25remsame as light
--slean-space-1calc(var(--slean-spacing) * 1)same as light
--slean-space-2calc(var(--slean-spacing) * 2)same as light
--slean-space-3calc(var(--slean-spacing) * 3)same as light
--slean-space-4calc(var(--slean-spacing) * 4)same as light
--slean-space-5calc(var(--slean-spacing) * 5)same as light
--slean-space-6calc(var(--slean-spacing) * 6)same as light
--slean-space-7calc(var(--slean-spacing) * 8)same as light
--slean-space-8calc(var(--slean-spacing) * 10)same as light

Shape

one radius and its steps. --slean-radius is the medium step (fields, buttons, cards); 0 gives a square theme.

TokenLightDark
--slean-radius0.625remsame as light
--slean-radius-smcalc(var(--slean-radius) * 0.6)same as light
--slean-radius-mdvar(--slean-radius)same as light
--slean-radius-lgcalc(var(--slean-radius) * 1.4)same as light
--slean-radius-full9999pxsame as light

The space between a dialog's children (none by default

the header and the footer bring their own). Set it here rather than with gap on the dialog, so the close button, which takes no room, cancels it.

TokenLightDark
--slean-dialog-gap0pxsame as light

Control heights of data-size="small" (32px)

"medium" (36px, the default of every form control, button and bar) and "large" (44px); xs (28px) is for dense rows. A coarse pointer raises them to 40, 44 and 48px; data-density changes them for a subtree (block 4).

TokenLightDark
--slean-control-height-xs1.75remsame as light
--slean-control-height-sm2remsame as light
--slean-control-height-md2.25remsame as light
--slean-control-height-lg2.75remsame as light

The border of a field under the pointer (outlined variant)

Unset by default, so it is the field's current color (data-color, primary by default); a theme sets it to soften the hover, for example to var(--slean-fg-muted).

TokenLightDark
--slean-control-border-hoverinitialsame as light

The check mark at the end of a chosen option row

TokenLightDark
--slean-option-check-size1remsame as light

The side of a file drop tile (data-variant="picture-card" and "picture-circle")

each chosen file and the add tile.

TokenLightDark
--slean-file-drop-tile-size6.5remsame as light

Icons (ADR 0007)

16×16 SVG masks. A primitive paints one with `background: currentColor; mask: var(--slean-icon-…) center / contain no-repeat`, so it takes the text color and follows the theme. Replace a token to swap an icon set.

TokenLightDark
--slean-icon-selectvar(--slean-icon-chevron-down)same as light

How far the select icon turns while the list is open

a chevron points up; an up-and-down pair stays as it is (0deg).

TokenLightDark
--slean-icon-select-turn180degsame as light
--slean-icon-chevron-downurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-chevron-upurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 10l4-4 4 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-chevron-lefturl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10 4L6 8l4 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-chevron-righturl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l4 4-4 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-chevrons-lefturl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4L4 8l4 4M12 4L8 8l4 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-chevrons-righturl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l4 4-4 4M8 4l4 4-4 4' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-checkurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-minusurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9' stroke='black' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-plusurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5v9M3.5 8h9' stroke='black' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-closeurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7m0-7l-7 7' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-clearurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cdefs%3E%3Cmask id='m'%3E%3Crect width='16' height='16' fill='white'/%3E%3Cpath d='M6 6l4 4m0-4l-4 4' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/mask%3E%3C/defs%3E%3Ccircle cx='8' cy='8' r='6.5' mask='url(%23m)'/%3E%3C/svg%3E")same as light
--slean-icon-moreurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='3.5' cy='8' r='1.25'/%3E%3Ccircle cx='8' cy='8' r='1.25'/%3E%3Ccircle cx='12.5' cy='8' r='1.25'/%3E%3C/svg%3E")same as light
--slean-icon-gripurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4h.01M10 4h.01M6 8h.01M10 8h.01M6 12h.01M10 12h.01' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E")same as light
--slean-icon-searchurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5L14 14'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-eyeurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Cpath d='M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-eye-offurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Cpath d='M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3Cpath d='M2.5 2.5l11 11'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-calendarurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Crect x='2.5' y='3.5' width='11' height='10' rx='1.5'/%3E%3Cpath d='M2.5 6.75h11M5.5 2v3M10.5 2v3'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-arrow-righturl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h11M10 4.5L13.5 8 10 11.5' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light
--slean-icon-infourl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.25'/%3E%3Cpath d='M8 7.5v3.5M8 5v.01'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-successurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.25'/%3E%3Cpath d='M5.5 8.25l1.75 1.75 3.25-3.5'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-warningurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Cpath d='M6.7 2.75a1.5 1.5 0 012.6 0l5.1 8.9a1.5 1.5 0 01-1.3 2.25H2.9a1.5 1.5 0 01-1.3-2.25z'/%3E%3Cpath d='M8 6.25v3M8 11.5v.01'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-errorurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Ccircle cx='8' cy='8' r='6.25'/%3E%3Cpath d='M10 6l-4 4M6 6l4 4'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-fileurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'%3E%3Cpath d='M9 1.75H4.5a1.5 1.5 0 00-1.5 1.5v9.5a1.5 1.5 0 001.5 1.5h7a1.5 1.5 0 001.5-1.5V5.75z'/%3E%3Cpath d='M9 1.75v4h4'/%3E%3C/g%3E%3C/svg%3E")same as light
--slean-icon-uploadurl("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5V2.5m0 0L5 5.5m3-3l3 3M2.5 10.5v1.5a1.5 1.5 0 001.5 1.5h8a1.5 1.5 0 001.5-1.5v-1.5' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E")same as light

Typography

--slean-font-sans is the theme's family: a family list, or `initial` (on any element; `inherit` on :root does the same) for the page's own font: the token is then invalid, and `font-family: var(--slean-font-sans)` falls back to the inherited family. The scale is MUI's set of variants at an application-sized ramp: per variant a weight, a size and a line height (longhands, which the package reads, so the family can be invalid), and a `font` shorthand of the three and the family for your own rules (with the family invalid, the whole shorthand is: use the longhands). data-typography="h1" … on any element applies a variant (base.css). Controls (buttons, fields) take the page's family.

TokenLightDark
--slean-font-sansInter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serifsame as light
--slean-font-monoui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospacesame as light
--slean-text-xs0.75remsame as light
--slean-text-sm0.875remsame as light
--slean-text-md1remsame as light
--slean-text-lg1.125remsame as light
--slean-leading1.5same as light
--slean-font-weight-regular400same as light
--slean-font-weight-medium500same as light
--slean-font-weight-semibold600same as light
--slean-font-weight-bold700same as light
--slean-typography-h1-weight700same as light
--slean-typography-h1-size2.25remsame as light
--slean-typography-h1-line-height1.2same as light
--slean-typography-h2-weight700same as light
--slean-typography-h2-size1.875remsame as light
--slean-typography-h2-line-height1.25same as light
--slean-typography-h3-weight600same as light
--slean-typography-h3-size1.5remsame as light
--slean-typography-h3-line-height1.3same as light
--slean-typography-h4-weight600same as light
--slean-typography-h4-size1.25remsame as light
--slean-typography-h4-line-height1.35same as light
--slean-typography-h5-weight600same as light
--slean-typography-h5-size1.125remsame as light
--slean-typography-h5-line-height1.4same as light
--slean-typography-h6-weight600same as light
--slean-typography-h6-size1remsame as light
--slean-typography-h6-line-height1.5same as light
--slean-typography-subtitle1-weight500same as light
--slean-typography-subtitle1-size1remsame as light
--slean-typography-subtitle1-line-height1.5same as light
--slean-typography-subtitle2-weight500same as light
--slean-typography-subtitle2-size0.875remsame as light
--slean-typography-subtitle2-line-height1.45same as light
--slean-typography-body1-weight400same as light
--slean-typography-body1-size1remsame as light
--slean-typography-body1-line-height1.5same as light
--slean-typography-body2-weight400same as light
--slean-typography-body2-size0.875remsame as light
--slean-typography-body2-line-height1.45same as light
--slean-typography-caption-weight400same as light
--slean-typography-caption-size0.75remsame as light
--slean-typography-caption-line-height1.65same as light
--slean-typography-overline-weight500same as light
--slean-typography-overline-size0.75remsame as light
--slean-typography-overline-line-height2same as light
--slean-typography-button-weight500same as light
--slean-typography-button-size0.875remsame as light
--slean-typography-button-line-height1.25same as light
--slean-typography-h1var(--slean-typography-h1-weight) var(--slean-typography-h1-size) / var(--slean-typography-h1-line-height) var(--slean-font-sans)same as light
--slean-typography-h2var(--slean-typography-h2-weight) var(--slean-typography-h2-size) / var(--slean-typography-h2-line-height) var(--slean-font-sans)same as light
--slean-typography-h3var(--slean-typography-h3-weight) var(--slean-typography-h3-size) / var(--slean-typography-h3-line-height) var(--slean-font-sans)same as light
--slean-typography-h4var(--slean-typography-h4-weight) var(--slean-typography-h4-size) / var(--slean-typography-h4-line-height) var(--slean-font-sans)same as light
--slean-typography-h5var(--slean-typography-h5-weight) var(--slean-typography-h5-size) / var(--slean-typography-h5-line-height) var(--slean-font-sans)same as light
--slean-typography-h6var(--slean-typography-h6-weight) var(--slean-typography-h6-size) / var(--slean-typography-h6-line-height) var(--slean-font-sans)same as light
--slean-typography-subtitle1var(--slean-typography-subtitle1-weight) var(--slean-typography-subtitle1-size) / var(--slean-typography-subtitle1-line-height) var(--slean-font-sans)same as light
--slean-typography-subtitle2var(--slean-typography-subtitle2-weight) var(--slean-typography-subtitle2-size) / var(--slean-typography-subtitle2-line-height) var(--slean-font-sans)same as light
--slean-typography-body1var(--slean-typography-body1-weight) var(--slean-typography-body1-size) / var(--slean-typography-body1-line-height) var(--slean-font-sans)same as light
--slean-typography-body2var(--slean-typography-body2-weight) var(--slean-typography-body2-size) / var(--slean-typography-body2-line-height) var(--slean-font-sans)same as light
--slean-typography-captionvar(--slean-typography-caption-weight) var(--slean-typography-caption-size) / var(--slean-typography-caption-line-height) var(--slean-font-sans)same as light
--slean-typography-overlinevar(--slean-typography-overline-weight) var(--slean-typography-overline-size) / var(--slean-typography-overline-line-height) var(--slean-font-sans)same as light
--slean-typography-buttonvar(--slean-typography-button-weight) var(--slean-typography-button-size) / var(--slean-typography-button-line-height) var(--slean-font-sans)same as light
--slean-typography-button-transformnonesame as light
--slean-typography-overline-transformuppercasesame as light

Motion

The indicator duration is one turn of a loading indicator (the busy button and the circular progress); reduced motion slows it instead of stopping it, so a still ring never reads as a stuck page.

TokenLightDark
--slean-duration-fast100mssame as light
--slean-duration-normal160mssame as light
--slean-duration-slow240mssame as light
--slean-duration-indicator750mssame as light
--slean-easecubic-bezier(0.2, 0, 0, 1)same as light
--slean-ease-in-outcubic-bezier(0.4, 0, 0.2, 1)same as light
--slean-ease-outcubic-bezier(0, 0, 0.2, 1)same as light
--slean-ease-incubic-bezier(0.4, 0, 1, 1)same as light
--slean-ease-sharpcubic-bezier(0.4, 0, 0.6, 1)same as light

Scroll edge fades (scroll-area.css

data-slean-fade): how deep the fade at an edge that can still scroll is (set on :root, as the ramp reads it there), and the mask's ramp over that depth (only the alpha counts) — eased, so the row at the edge stays a ghost of itself rather than a gap.

TokenLightDark
--slean-fade-size1.5remsame as light
--slean-fade-rampoklch(0% 0 0 / 0.08), oklch(0% 0 0 / 0.55) calc(var(--slean-fade-size) / 2), oklch(0% 0 0) var(--slean-fade-size)same as light

Stacking

for application chrome outside the top layer (a sticky app bar, an in-page drawer). Dialogs, popovers, menus, tooltips and toasts live in the browser's top layer, above every z-index; these values only order what is not in it.

TokenLightDark
--slean-z-app-bar1100same as light
--slean-z-drawer1200same as light
--slean-z-modal1300same as light
--slean-z-snackbar1400same as light
--slean-z-tooltip1500same as light

Breakpoints

for reference and container queries (a custom property cannot appear in a media query): xs 0, sm 600px, md 900px, lg 1200px, xl 1536px.

TokenLightDark
--slean-breakpoint-xs0pxsame as light
--slean-breakpoint-sm600pxsame as light
--slean-breakpoint-md900pxsame as light
--slean-breakpoint-lg1200pxsame as light
--slean-breakpoint-xl1536pxsame as light

Focus ring geometry

used by every :focus-visible outline.

TokenLightDark
--slean-focus-ring-width2pxsame as light
--slean-focus-ring-offset2pxsame as light

Inputs written as inline styles on a root

not theme tokens: the range slider's two values and the splitter's first pane (written by their behaviors), and the value of a circular progress (written by the author next to value), as percentages without the unit; the color of one swatch of a swatch radio group (written by the author on its label).

TokenLightDark
--slean-range-start0same as light
--slean-range-end100same as light
--slean-split50same as light
--slean-value0same as light
--slean-swatchtransparentsame as light
--slean-color-schemelightdark

Neutral scale

1 = page background, 12 = strongest text. 8 is the control border, at least 3:1 against the surface and the page background in both themes.

TokenLightDark
--slean-neutral-1oklch(99.5% 0.002 260)oklch(16.5% 0.008 260)
--slean-neutral-2oklch(98.2% 0.003 260)oklch(19.5% 0.009 260)
--slean-neutral-3oklch(95.8% 0.004 260)oklch(23% 0.01 260)
--slean-neutral-4oklch(93.2% 0.005 260)oklch(26% 0.011 260)
--slean-neutral-5oklch(90.5% 0.006 260)oklch(29.5% 0.012 260)
--slean-neutral-6oklch(87.2% 0.007 260)oklch(33.5% 0.013 260)
--slean-neutral-7oklch(80.8% 0.009 260)oklch(39.5% 0.014 260)
--slean-neutral-8oklch(63.5% 0.012 260)oklch(53% 0.015 260)
--slean-neutral-9oklch(55.2% 0.015 260)oklch(58% 0.015 260)
--slean-neutral-10oklch(50.8% 0.015 260)oklch(63% 0.015 260)
--slean-neutral-11oklch(44.6% 0.014 260)oklch(74% 0.012 260)
--slean-neutral-12oklch(20.5% 0.012 260)oklch(95% 0.005 260)

Palette (MUI-style)

per color a main tone, a lighter and a darker one, the text that sits on main (contrast-text), and the tint and text of the standard (soft) variants. Neutral is derived from the neutral scale in the alias block. Every pair a variant draws meets WCAG AA (tests/contrast.test.ts): contrast-text on main and dark at least 4.5:1, main as text on the surface, the page and its own hover tint at least 4.5:1, soft-text on soft at least 4.5:1. In light the mains are dark enough for white text; in dark they are light, with dark text, as in MUI's dark palette.

TokenLightDark
--slean-primary-mainoklch(51% 0.18 258)oklch(71% 0.13 258)
--slean-primary-lightoklch(64% 0.144 258)oklch(80% 0.099 258)
--slean-primary-darkoklch(45% 0.165 258)oklch(64% 0.13 258)
--slean-primary-contrast-textoklch(100% 0 0)oklch(18% 0.02 258)
--slean-primary-softoklch(95% 0.02 258)oklch(28% 0.07 258)
--slean-primary-soft-textoklch(42% 0.155 258)oklch(85% 0.07 258)
--slean-secondary-mainoklch(52% 0.2 305)oklch(72% 0.13 305)
--slean-secondary-lightoklch(64% 0.16 305)oklch(81% 0.104 305)
--slean-secondary-darkoklch(45% 0.2 305)oklch(65% 0.13 305)
--slean-secondary-contrast-textoklch(100% 0 0)oklch(18% 0.02 305)
--slean-secondary-softoklch(95.5% 0.025 305)oklch(28% 0.08 305)
--slean-secondary-soft-textoklch(43% 0.17 305)oklch(86% 0.08 305)
--slean-error-mainoklch(52% 0.19 25)oklch(72% 0.13 25)
--slean-error-lightoklch(64% 0.152 25)oklch(81% 0.104 25)
--slean-error-darkoklch(45% 0.18 25)oklch(65% 0.13 25)
--slean-error-contrast-textoklch(100% 0 0)oklch(18% 0.02 25)
--slean-error-softoklch(95.5% 0.02 25)oklch(27% 0.08 25)
--slean-error-soft-textoklch(45% 0.18 25)oklch(85% 0.08 25)
--slean-warning-mainoklch(52% 0.125 55)oklch(76% 0.14 55)
--slean-warning-lightoklch(64% 0.104 55)oklch(85% 0.092 55)
--slean-warning-darkoklch(45% 0.11 55)oklch(69% 0.14 55)
--slean-warning-contrast-textoklch(100% 0 0)oklch(18% 0.02 55)
--slean-warning-softoklch(96% 0.04 85)oklch(28% 0.055 80)
--slean-warning-soft-textoklch(45% 0.09 75)oklch(87% 0.12 85)
--slean-info-mainoklch(50% 0.105 235)oklch(72% 0.11 235)
--slean-info-lightoklch(62% 0.088 235)oklch(81% 0.088 235)
--slean-info-darkoklch(43% 0.09 235)oklch(65% 0.11 235)
--slean-info-contrast-textoklch(100% 0 0)oklch(18% 0.02 235)
--slean-info-softoklch(95.5% 0.025 235)oklch(28% 0.055 235)
--slean-info-soft-textoklch(43% 0.09 235)oklch(86% 0.08 235)
--slean-success-mainoklch(49% 0.13 150)oklch(72% 0.14 150)
--slean-success-lightoklch(61% 0.104 150)oklch(81% 0.112 150)
--slean-success-darkoklch(42% 0.115 150)oklch(65% 0.14 150)
--slean-success-contrast-textoklch(100% 0 0)oklch(18% 0.02 150)
--slean-success-softoklch(95.5% 0.04 150)oklch(27% 0.07 150)
--slean-success-soft-textoklch(40% 0.11 150)oklch(85% 0.12 150)

Surfaces that differ between the themes

TokenLightDark
--slean-surfaceoklch(100% 0 0)var(--slean-neutral-2)
--slean-mutedvar(--slean-neutral-3)var(--slean-neutral-4)
--slean-muted-hovervar(--slean-neutral-4)var(--slean-neutral-5)
--slean-overlayoklch(0% 0 0 / 0.4)oklch(0% 0 0 / 0.6)

Elevation 0-5 (MUI's 0-24 compressed)

resting surfaces 1, raised cards 2, menus and popovers 3, dialogs 4, drawers and toasts 5.

TokenLightDark
--slean-elevation-0nonenone
--slean-elevation-10 1px 2px oklch(0% 0 0 / 0.08)0 1px 2px oklch(0% 0 0 / 0.4)
--slean-elevation-20 2px 6px oklch(0% 0 0 / 0.08), 0 1px 2px oklch(0% 0 0 / 0.06)0 2px 6px oklch(0% 0 0 / 0.45), 0 1px 2px oklch(0% 0 0 / 0.35)
--slean-elevation-30 4px 12px oklch(0% 0 0 / 0.1), 0 1px 3px oklch(0% 0 0 / 0.08)0 4px 12px oklch(0% 0 0 / 0.5), 0 1px 3px oklch(0% 0 0 / 0.4)
--slean-elevation-40 16px 40px oklch(0% 0 0 / 0.18), 0 2px 6px oklch(0% 0 0 / 0.08)0 16px 40px oklch(0% 0 0 / 0.6), 0 2px 6px oklch(0% 0 0 / 0.4)
--slean-elevation-50 24px 56px oklch(0% 0 0 / 0.22), 0 4px 10px oklch(0% 0 0 / 0.1)0 24px 56px oklch(0% 0 0 / 0.65), 0 4px 10px oklch(0% 0 0 / 0.45)

Semantic surfaces and text

TokenLightDark
--slean-bgvar(--slean-neutral-1)same as light
--slean-fgvar(--slean-neutral-12)same as light
--slean-fg-mutedvar(--slean-neutral-11)same as light
--slean-bordervar(--slean-neutral-6)same as light
--slean-border-strongvar(--slean-neutral-8)same as light

Neutral

the seventh color: the grey scale as a palette.

TokenLightDark
--slean-neutral-mainvar(--slean-neutral-11)same as light
--slean-neutral-lightvar(--slean-neutral-8)same as light
--slean-neutral-darkvar(--slean-neutral-12)same as light
--slean-neutral-contrast-textvar(--slean-neutral-1)same as light
--slean-neutral-softvar(--slean-neutral-3)same as light
--slean-neutral-soft-textvar(--slean-neutral-12)same as light

The current color

what data-color selects (block 4), primary by default. A component draws its variants from these eight tokens only, so every color works with every variant.

TokenLightDark
--slean-color-mainvar(--slean-primary-main)same as light
--slean-color-lightvar(--slean-primary-light)same as light
--slean-color-darkvar(--slean-primary-dark)same as light
--slean-color-contrast-textvar(--slean-primary-contrast-text)same as light
--slean-color-softvar(--slean-primary-soft)same as light
--slean-color-soft-textvar(--slean-primary-soft-text)same as light

The ink and the line of the outlined and text variants

the main tone and a half-tone line of it for every color; for neutral, MUI's "inherit": the text color and the border hairline (block 4).

TokenLightDark
--slean-color-textvar(--slean-primary-main)same as light
--slean-color-bordercolor-mix(in oklch, var(--slean-primary-main) 50%, transparent)same as light

Control shell (ADR 0007)

the field every form control shares (input, select, autocomplete, date picker and the other fields). The border is at least 3:1 against the surface; hover and focus take the primary color and the focus ring is a soft halo of it; a disabled control sits on the muted surface.

TokenLightDark
--slean-control-bgvar(--slean-surface)same as light
--slean-control-bg-disabledvar(--slean-muted)same as light
--slean-control-border-disabledvar(--slean-border)same as light
--slean-control-bordervar(--slean-border-strong)same as light
--slean-control-ring-error0 0 0 3px color-mix(in oklch, var(--slean-error-main) 22%, transparent)same as light
--slean-control-ring-warning0 0 0 3px color-mix(in oklch, var(--slean-warning-main) 28%, transparent)same as light

The surface of data-variant="filled" fields and the line of "standard" ones

TokenLightDark
--slean-control-filled-bgvar(--slean-muted)same as light
--slean-control-filled-bg-hovervar(--slean-muted-hover)same as light
--slean-control-iconvar(--slean-fg-muted)same as light

Option rows of every listbox (select

autocomplete, the native picker): the active row (hover or keyboard position) and the chosen one, and the row's own metrics. A theme that marks the chosen row with its check alone sets the ring to none and the weight to the normal one.

TokenLightDark
--slean-option-activevar(--slean-muted)same as light
--slean-option-active-fgvar(--slean-fg)same as light
--slean-option-selectedvar(--slean-primary-soft)same as light
--slean-option-selected-fgvar(--slean-primary-soft-text)same as light
--slean-option-selected-weightvar(--slean-font-weight-semibold)same as light
--slean-option-selected-ringinset 0 0 0 1px var(--slean-option-selected-fg)same as light
--slean-option-min-heightvar(--slean-control-height-sm)same as light
--slean-option-padding-blockvar(--slean-space-1)same as light
--slean-option-padding-inlinevar(--slean-space-2)same as light
--slean-popup-radiusvar(--slean-radius-md)same as light
--slean-popup-shadowvar(--slean-elevation-3)same as light

Component defaults a theme sets in one place (MUI's theme.components)

TokenLightDark
--slean-button-radiusvar(--slean-radius-md)same as light

A font shorthand; button.css takes the family from the page

so the family here is only a placeholder and --slean-font-sans may be anything, `initial` included.

TokenLightDark
--slean-button-fontvar(--slean-typography-button-weight) var(--slean-typography-button-size) / var(--slean-typography-button-line-height) sans-serifsame as light
--slean-button-transformvar(--slean-typography-button-transform)same as light
--slean-field-radiusvar(--slean-radius-md)same as light
--slean-card-radiusvar(--slean-radius-lg)same as light
--slean-card-elevationvar(--slean-elevation-1)same as light
--slean-dialog-radiusvar(--slean-radius-lg)same as light
--slean-dialog-elevationvar(--slean-elevation-4)same as light

The dialog's padding

its content inset, the bleed of its sticky header and footer and their sticky offsets all follow it, so a denser theme changes one token.

TokenLightDark
--slean-dialog-paddingvar(--slean-space-6)same as light
--slean-chip-radiusvar(--slean-radius-full)same as light

Focus ring

used by every :focus-visible outline.

TokenLightDark
--slean-focus-ring-colorvar(--slean-primary-main)same as light
--slean-focus-ringvar(--slean-focus-ring-width) solid var(--slean-focus-ring-color)same as light

Media adjustments

Forced colors

Author-controlled tokens map to system colors. Query: @media (forced-colors: active).

TokenValue under the query
--slean-focus-ring-colorHighlight
--slean-borderCanvasText
--slean-border-strongCanvasText
--slean-elevation-1none
--slean-elevation-2none
--slean-elevation-3none
--slean-elevation-4none
--slean-elevation-5none

Reduced motion

Transition durations become zero; the loading indicator duration grows longer. Query: @media (prefers-reduced-motion: reduce).

TokenValue under the query
--slean-duration-fast0ms
--slean-duration-normal0ms
--slean-duration-slow0ms
--slean-duration-indicator1600ms

Coarse pointer

Every control height grows and the small one reaches the pointer target size; checkbox and switch add their own hit area. Query: @media (pointer: coarse).

TokenValue under the query
--slean-control-height-xs2.25rem
--slean-control-height-sm2.5rem
--slean-control-height-md2.75rem
--slean-control-height-lg3rem

Source

packages/styles/css/tokens.css, parsed by tokens.ts. scripts/check.mjs fails on a token defined in a component file, an unknown token, or differing dark blocks. Minified size: 4080 B gzip · 3400 B brotli.