Triage design system v0.13.1-experiment
Home / Foundations / Platform & themes

Platform & themes

Dark mode, forced colors, RTL and print — the four platform modes the token layer now covers.
One token file, four platform modes. Dark mode, Windows High Contrast (forced colors), RTL layouts and print are all handled from the token layer and logical properties — no second stylesheet, no per-component overrides. Use the theme toggle in the sidebar or topbar to flip this site live.

Dark theme — surfaces rise instead of casting shadows

every colour primitive has a dark value in tokens.json ($extensions.com.triage.dark)
PrimitiveLight on #fafafaDark on #0f0f0fLight contrastDark contrast
--bg #fafafa #0f0f0f— (surface)— (surface)
--card #ffffff #161616— (surface)— (surface)
--fg #000000 #f5f5f520.12:117.58:1
--dim #666666 #a8a8a85.50:18.06:1
--acc #0057d9 #5aa9ff5.98:17.81:1
--ok #04713f #45d68f5.85:110.29:1
--warn #9a4f07 #f0ae4f5.76:19.92:1
--err #c81e2c #ff8a805.47:18.40:1
--panel #000000 #000000— (surface)— (surface)
--codebg #0a0a0a #000000— (surface)— (surface)

How it wires

tokens.css, generated from tokens.json
:root{color-scheme:light;--bg:#fafafa;…}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){color-scheme:dark;--bg:#0f0f0f;…}
}
:root[data-theme="dark"]{color-scheme:dark;--bg:#0f0f0f;…}

<!-- override per subtree or per app -->
<html data-theme="dark">  or  <div data-theme="light">

forced-colors / Windows High Contrast

In forced-colors mode the browser forces box-shadow to none, which would delete the focus ring and every elevation cue. 0.3 extends the fallbacks to form controls (which had suppressed outlines), progress fills, skeletons and tooltips:

@media (forced-colors: active){
  :focus-visible{outline:2px solid Highlight;outline-offset:2px}
  .dlg,[popover]{border:2px solid CanvasText}
  .msg,.note,.badge,.px-sw .px-tr{border:1px solid CanvasText}
  .toast2,.logpanel{background:Canvas;color:CanvasText;box-shadow:none}
}
MDN: forced-colors sets box-shadow and text-shadow to none and forces background-image; a border/system-colour fallback is the documented technique.

RTL — logical properties, one stylesheet

TR واجهة من اليمين إلى اليسار مرآة
تمقيد الانتظار
the demo above is the same markup/CSS with dir="rtl" — no RTL stylesheet exists
.card{margin-inline-start:24px;padding-inline:20px;
  border-inline-start:2px solid var(--interactive)}
.dock{inset-inline-end:0}
.tbl td.num{text-align:end}
Migration done — including transforms. Core moved from 78 physical direction properties to logical properties, and 0.3 fixed the direction-critical transforms that CSS logical properties cannot express: drawer slide, tooltip/flow centering, switch-knob travel and dock transitions all carry [dir=rtl] overrides. TDS013 flags physical properties (transforms are covered by the RTL overrides and the visual audit).

Print

chrome hides, content drops its margins; elevation is meaningless on paper
@media print{
  .side,.topbar,.bottom-nav,.toasts,.dock,.scrim,.skip,.rowacts{display:none!important}
  .main{margin:0!important}
  .content{max-width:none;padding:0}
  .card{box-shadow:none}
}
Triage Design System v0.13.1-experiment — the central, app-agnostic UI design authority. Source of truth: /tokens/tokens.json. Showcase chrome only: site/.