إنتقل إلى المحتوى الرئيسي

Tokens

Generated by scripts/build.mjs from tokens/tokens.json: every token, as the custom property the CSS declares (dist/tokens.css): its path in the file, less the layer, prefixed --al-.

Use the semantic tokens: they name what a value is for, so the themes, Arabic and contrast stay right in one place. The primitives are the palette they point to; a component uses them only through a role (principles). A value that's another token is named without its prefix: color-cloud-98 is --al-color-cloud-98. Where a mode has its own value, it's beside the light theme's: dark, under [data-theme="dark"] or the system's setting, and Arabic, under :lang(ar).

Semantic​

Colour​

Roles. Most roles point to a primitive; the exceptions are literal on purpose: translucent colours (washes, line-strong, the backdrop, pattern-line), which are a hue at an alpha that only makes sense for that role, and the tints, which are a fixed palette of their own. Each is still measured by the contrast check.

TokenValueDarkFor
--al-color-bgcolor-cloud-98color-slate-18The page.
--al-color-surfacecolor-whitecolor-slate-21Cards, panels, dialogs, inputs.
--al-color-surface-sunkcolor-cloud-96color-slate-24Wells, table stripes, info notices, hover.
--al-color-textcolor-cloud-21color-sand-93Body text and headings.
--al-color-text-mutedcolor-cloud-45color-sand-74Secondary text, hints, captions.
--al-color-linecolor-cloud-93oklch(100% 0 0 / 0.12)Hairlines that separate (decorative: no contrast minimum).
--al-color-line-strongoklch(20.8% 0.042 266 / 0.4)oklch(100% 0 0 / 0.4)Section rules and dividers that structure a page.
--al-color-controlcolor-slate-62Borders of form controls: at least 3:1 against surfaces (WCAG 1.4.11). The same in both themes.
--al-color-accentcolor-teal-51color-teal-83The brand accent: primary actions, links on hover, focus, selection; and success, with an icon and a word.
--al-color-accent-hovercolor-teal-43color-teal-91A primary button, hovered: a clear step from the accent, with on-accent still readable.
--al-color-on-accentcolor-whitecolor-slate-18Text and icons on the accent.
--al-color-accent-washoklch(60% 0.11 183 / 0.12)oklch(82.5% 0.105 168 / 0.12)Tints: selected rows, highlighted totals.
--al-color-focuscolor-teal-51color-teal-83The focus outline.
--al-color-focus-on-inversecolor-teal-83color-teal-51The focus outline on the inverse ground (the bulk bar, toasts): the other theme's focus colour.
--al-color-dangercolor-red-54color-red-68Errors, and actions that destroy.
--al-color-danger-hovercolor-red-46color-red-78A filled danger button, hovered.
--al-color-danger-washoklch(63% 0.22 27 / 0.1)oklch(68% 0.17 25 / 0.14)
--al-color-warningcolor-amber-49color-amber-80Needs attention soon; experimental.
--al-color-warning-washoklch(86% 0.16 92 / 0.3)oklch(80% 0.12 85 / 0.12)
--al-color-successcolor-teal-51color-teal-83Done, saved, passed: the brand teal, always with an icon and a word, so colour is never the only signal.
--al-color-success-washoklch(60% 0.11 183 / 0.12)oklch(82.5% 0.105 168 / 0.12)
--al-color-infocolor-blue-53color-blue-80Neutral information.
--al-color-info-washoklch(62% 0.19 262 / 0.1)oklch(80% 0.08 250 / 0.12)
--al-color-backdropoklch(20.8% 0.042 266 / 0.45)oklch(0% 0 0 / 0.6)Behind modal dialogs.
--al-color-inversecolor-cloud-21color-sand-93Toasts and tooltips: a dark chip on a light page, and the reverse.
--al-color-on-inversecolor-cloud-98color-slate-18
--al-color-chart-0color-cloud-87oklch(100% 0 0 / 0.2)The neutral: the rest, the track.
--al-color-chart-1color-chart-green-lightcolor-chart-green-dark
--al-color-chart-2color-chart-orange-lightcolor-chart-orange-dark
--al-color-chart-3color-chart-blue-lightcolor-chart-blue-dark
--al-color-chart-4color-chart-raspberry-lightcolor-chart-raspberry-dark
--al-color-tint-teal-bg#CCFBF1oklch(70% 0.13 183 / 0.18)
--al-color-tint-teal-ink#115E59#5EEAD4
--al-color-tint-green-bg#DCFCE7oklch(72% 0.17 150 / 0.18)
--al-color-tint-green-ink#166534#86EFAC
--al-color-tint-yellow-bg#FEF9C3oklch(85% 0.17 95 / 0.18)
--al-color-tint-yellow-ink#854D0E#FDE047
--al-color-tint-orange-bg#FFEDD5oklch(75% 0.16 55 / 0.18)
--al-color-tint-orange-ink#9A3412#FDBA74
--al-color-tint-pink-bg#FCE7F3oklch(72% 0.17 350 / 0.18)
--al-color-tint-pink-ink#9D174D#F9A8D4
--al-color-tint-purple-bg#F3E8FFoklch(70% 0.17 305 / 0.2)
--al-color-tint-purple-ink#6B21A8#D8B4FE
--al-color-tint-blue-bg#DBEAFEoklch(68% 0.16 262 / 0.2)
--al-color-tint-blue-ink#1E40AF#93C5FD
--al-color-tint-cyan-bg#CFFAFEoklch(75% 0.13 215 / 0.18)
--al-color-tint-cyan-ink#155E75#67E8F9
--al-color-syntax-keyword#7E22CE#D8B4FE
--al-color-syntax-string#166534#86EFAC
--al-color-syntax-number#9A3412#FDBA74
--al-color-syntax-comment#5B6474#A3ABB8
--al-color-syntax-function#1D4ED8#93C5FD
--al-color-syntax-tag#0F766E#5EEAD4
--al-color-syntax-attribute#9D174D#F9A8D4
--al-color-pattern-lineoklch(24.5% 0.028 265 / 0.26)oklch(100% 0 0 / 0.2)The tessellation's strands, in ink, as on arabesquelabs.com: quiet enough for a heading and lede to sit on in the hero; never behind body text.
--al-color-pattern-scaffoldoklch(24.5% 0.028 265 / 0.12)oklch(100% 0 0 / 0.1)The tiling's polygons, shown as scaffolding while the hero draws itself in, and in the construction figure.
--al-color-pattern-quietoklch(24.5% 0.028 265 / 0.14)oklch(100% 0 0 / 0.1)The quiet pattern: a low-contrast field for a small area (an empty state, a card) with nothing on it; never behind text.
--al-color-pattern-focalcolor-accentThe hero's focal tile: its star, and its octagon at reduced opacity.
--al-color-pattern-focal-filloklch(51% 0.095 183 / 0.16)oklch(82.5% 0.105 168 / 0.16)The fill inside the focal tile's star.

Typefaces​

Latin first; each Latin face has no Arabic, so Arabic falls through to its own face in the same stack.

TokenValueFor
--al-font-sansJost, IBM Plex Sans Arabic, Noto Sans Arabic, SF Arabic, Geeza Pro, ui-sans-serif, system-ui, sans-serifInterface text.
--al-font-displayJost, Kufam, Noto Kufi Arabic, IBM Plex Sans Arabic, ui-sans-serif, system-ui, sans-serifHeadings and the wordmark.
--al-font-serifNewsreader, Amiri, Noto Naskh Arabic, Scheherazade New, Georgia, serifReading text.
--al-font-monoIBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, monospaceCode and fixed-width figures.

Script scale​

Multiplies every text size: Arabic is set a little larger to match Latin's apparent size.

TokenValueArabicFor
--al-script-scale11.08Multiplies every text size: Arabic is set a little larger to match Latin's apparent size.

Type sizes​

The type scale. Each size is multiplied by --al-script-scale when built.

TokenValueFor
--al-text-xs0.8125rem
--al-text-sm0.9375rem
--al-text-base1.0625remInterface body text.
--al-text-md1.1875remReading text.
--al-text-lg1.375rem
--al-text-xl1.625rem
--al-text-2xlclamp(1.875rem, 1.6rem + 1.1vw, 2.5rem)
--al-text-3xlclamp(2.25rem, 1.7rem + 2.2vw, 3.375rem)
--al-text-displayclamp(2.75rem, 1.9rem + 3.6vw, 5rem)

Line height​

Line heights; Arabic (the ar mode) needs more room for its ascenders, descenders and marks.

TokenValueArabic
--al-leading-tight1.11.35
--al-leading-heading1.21.45
--al-leading-ui1.451.65
--al-leading-prose1.61.9

Weight​

TokenValue
--al-weight-regular400
--al-weight-medium500
--al-weight-semibold600

Letter-spacing​

TokenValueArabicFor
--al-tracking-tight-0.015em0
--al-tracking-none0
--al-tracking-wide0.05em0The wordmark only. Never on Arabic.

Space​

A 4px step (0.25rem): space-N is N × 4px.

TokenValueFor
--al-space-00
--al-space-10.25rem
--al-space-20.5rem
--al-space-30.75rem
--al-space-41rem
--al-space-51.25rem
--al-space-61.5rem
--al-space-82rem
--al-space-123rem
--al-space-164rem
--al-space-0-50.125rem
--al-space-1-50.375rem
--al-space-sectionclamp(3rem, 2rem + 6vw, 9rem)Between website sections.
--al-space-gutterclamp(1rem, 0.5rem + 3vw, 4rem)Page side gutter.

Radius​

TokenValueFor
--al-radius-sm0.125remControls, cards: the brand's crisp edge.
--al-radius-md0.25remChart ends, toasts.
--al-radius-full999px

Border​

TokenValue
--al-border-hairline1px
--al-border-focus2px
--al-border-focus-offset2px

Size​

TokenValueFor
--al-size-control-sm2rem32px.
--al-size-control-md2.5rem40px.
--al-size-target-min1.5remWCAG 2.5.8: every target at least 24 × 24px.
--al-size-target-touch2.75rem44px, on coarse pointers.
--al-size-icon1.125rem
--al-size-measure65chThe longest line of reading text.
--al-size-page75rem
--al-size-dialog-sm30rem
--al-size-dialog-md48rem
--al-size-sidebar14rem
--al-size-sidebar-collapsed3.75rem

Duration​

TokenValueFor
--al-duration-fast150msHover, press, feedback.
--al-duration-base250msTheme change, disclosure, toasts.

Easing​

TokenValue
--al-ease-standardcubic-bezier(0.2, 0, 0, 1)
--al-ease-exitcubic-bezier(0.4, 0, 1, 1)

Stacking​

TokenValue
--al-z-sticky10
--al-z-toast100

Breakpoints​

For JS and Tailwind; CSS media queries use the literal values (custom properties can't go in media queries).

TokenValue
--al-breakpoint-sm40rem
--al-breakpoint-md52rem
--al-breakpoint-lg64rem

Pattern​

The tessellation's geometry, read by js/pattern.js from the custom properties.

TokenValueFor
--al-pattern-side32pxPolygon side on wide screens.
--al-pattern-side-narrow22pxPolygon side under the md breakpoint.
--al-pattern-stroke1.25px
--al-pattern-contact-angle67.5Degrees.
--al-pattern-hero-side46pxPolygon side of the hero pattern (drawHero) on wide screens, as on arabesquelabs.com.
--al-pattern-hero-side-narrow30pxPolygon side of the hero pattern under the md breakpoint.
--al-pattern-hero-stroke1pxThe hero's strands and scaffolding.
--al-pattern-focal-stroke1.6pxThe focal tile's star.

Component​

Button​

TokenValue
--al-button-heightsize-control-md
--al-button-height-smsize-control-sm
--al-button-padding-inlinespace-4
--al-button-radiusradius-sm

Field​

TokenValue
--al-field-heightsize-control-md
--al-field-padding-inlinespace-3
--al-field-radiusradius-sm

Primitives​

Named by hue family and OKLCH lightness (so cloud-98 is about 98% lightness). Brand colours are noted with their logo-pack hex.

Sand​

TokenValueFor
--al-color-sand-74oklch(73.5% 0.012 100)
--al-color-sand-93oklch(92.8% 0.006 100)Pale #E8E7E3

Cloud​

Cool, bright neutrals for the light theme (close to Tailwind's slate 50–300, as on mosab.co.uk).

TokenValueFor
--al-color-cloud-21oklch(20.8% 0.042 266)#0F172A
--al-color-cloud-45oklch(44.6% 0.043 257)#475569
--al-color-cloud-87oklch(86.9% 0.022 252)#CBD5E1
--al-color-cloud-93oklch(92.9% 0.013 255)#E2E8F0
--al-color-cloud-96oklch(96.8% 0.007 248)#F1F5F9
--al-color-cloud-98oklch(98.4% 0.003 248)#F8FAFC

Slate​

TokenValueFor
--al-color-slate-18oklch(18.2% 0.017 265)Night #0E121A
--al-color-slate-21oklch(21.2% 0.018 265)
--al-color-slate-24oklch(24.2% 0.018 265)
--al-color-slate-62oklch(62% 0.012 265)

Teal​

TokenValueFor
--al-color-teal-43oklch(43% 0.08 183)The light theme's accent, hovered.
--al-color-teal-51oklch(51% 0.095 183)A brighter teal, near #0F766E: the light theme's accent.
--al-color-teal-83oklch(82.5% 0.105 168)Mint #7CDCB9
--al-color-teal-91oklch(91% 0.075 168)The dark theme's accent, hovered.

Red​

TokenValueFor
--al-color-red-46oklch(46% 0.18 27)Danger, hovered, in the light theme.
--al-color-red-54oklch(54% 0.21 27)A brighter red, near #DC2626.
--al-color-red-68oklch(68% 0.17 25)
--al-color-red-78oklch(78% 0.13 25)Danger, hovered, in the dark theme.

Amber​

TokenValue
--al-color-amber-49oklch(49% 0.105 75)
--al-color-amber-80oklch(80% 0.12 85)

Blue​

TokenValueFor
--al-color-blue-53oklch(53% 0.19 262)A bright blue, near #2563EB.
--al-color-blue-80oklch(80% 0.08 250)

Chart​

Categorical chart hues, in a fixed order, validated for colour-blind separation on both surfaces (dataviz palette validator).

TokenValue
--al-color-chart-green-light#007a5c
--al-color-chart-orange-light#c26300
--al-color-chart-blue-light#3d73b6
--al-color-chart-raspberry-light#b8336a
--al-color-chart-green-dark#3ba888
--al-color-chart-orange-dark#ca7e31
--al-color-chart-blue-dark#5188cd
--al-color-chart-raspberry-dark#d75b8f

White​

TokenValue
--al-color-whiteoklch(100% 0 0)