iterate.com / ui

git clone https://git.iterate.com/repos/ui

ui / src / styles / tokens.cssmain at d68d7e1

/* What packages/ui's components use beyond shadcn's own variables, with neutral values: the status
   colours, the highlight, chart series and the smallest text size. globals.css imports it, and
   iterate.css gives the status colours iterate's values (iterate/tokens.css). The registry gives each
   component item the ones its files use (scripts/ci/shadcn-registry.ts), so an app that installs one
   has them. */

@theme inline {
  --color-success: var(--success);
  --color-warning: var(--warning);
  --color-info: var(--info);
  --color-highlight: var(--highlight);
  --color-cloudflare: var(--cloudflare);
  --color-cloudflare-glow: var(--cloudflare-glow);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  /* The type scale: Tailwind's steps, and one smaller for a badge, a counter or a timestamp in a
     dense row. Controls, tables and the sidebar are text-sm; prose is text-base; headings text-lg
     and up. lint/design-tokens.test.ts refuses a size off the scale (text-[11px]). */
  --text-2xs: 0.6875rem;
  --text-2xs--line-height: calc(1 / 0.6875);
}

/* Each colour is light-dark(light, dark), so a registry item carries both as one value. */
:root {
  /* A status, dark enough to be text on white (light enough on black). The same colour is its dot
     (bg-success) and, at a tenth, its tint (bg-success/10). */
  --success: light-dark(oklch(0.508 0.118 165.612), oklch(0.765 0.177 163.223));
  --warning: light-dark(oklch(0.555 0.163 48.998), oklch(0.828 0.189 84.429));
  --info: light-dark(oklch(0.5 0.134 242.749), oklch(0.746 0.16 232.661));
  /* Cloudflare's brand: its orange (the button that goes to Cloudflare, cloudflare-button.tsx) and
     the lighter orange of its cloud's small arc. The same in every look. */
  --cloudflare: #f6821f;
  --cloudflare-glow: #fbad41;
  /* A marker pen's yellow, under the text a comment is about. */
  --highlight: light-dark(#ffc53d, #755800);
  /* Series in a chart: distinct hues that mean nothing on their own. */
  --chart-1: light-dark(#2a78d6, #78b4ff);
  --chart-2: light-dark(#eb6834, #ff966b);
  --chart-3: light-dark(#1baf7a, #65d6a6);
  --chart-4: light-dark(#eda100, #f4c45f);
  --chart-5: light-dark(#e87ba4, #f3a0c0);
}