Skip to content

Theme variables

flootlets uses shadcn/ui’s theme variables, plus --success and --warning in the same pattern. Each colour has a -foreground for text on top of it.

The values are shadcn/ui’s neutral theme, a placeholder until a shop brings its own. A few are adjusted just enough to meet WCAG AA, which shadcn’s defaults miss:

  • --input has more contrast in both themes, so input borders reach 3:1 against the page (shadcn’s is 1.3:1 in light, 1.5:1 in dark);
  • --ring is darker in light mode, so the focus ring reaches 3:1;
  • --muted-foreground and --destructive are a touch darker in light mode, so they stay at 4.5:1 as text on --muted.

This page reads theme.css directly, so it always shows the current values.

Colours

The ratio is each colour's contrast against the page background (--background) in that theme. In Tailwind, each variable is a colour: --primary isbg-primary, text-primary, border-primary.

VariableLightDark
--backgroundoklch(1 0 0) 1.0:1oklch(0.145 0 0) 1.0:1
--foregroundoklch(0.145 0 0) 19.8:1oklch(0.985 0 0) 19.0:1
--cardoklch(1 0 0) 1.0:1oklch(0.205 0 0) 1.1:1
--card-foregroundoklch(0.145 0 0) 19.8:1oklch(0.985 0 0) 19.0:1
--popoveroklch(1 0 0) 1.0:1oklch(0.205 0 0) 1.1:1
--popover-foregroundoklch(0.145 0 0) 19.8:1oklch(0.985 0 0) 19.0:1
--primaryoklch(0.205 0 0) 17.9:1oklch(0.922 0 0) 15.7:1
--primary-foregroundoklch(0.985 0 0) 1.0:1oklch(0.205 0 0) 1.1:1
--secondaryoklch(0.97 0 0) 1.1:1oklch(0.269 0 0) 1.3:1
--secondary-foregroundoklch(0.205 0 0) 17.9:1oklch(0.985 0 0) 19.0:1
--mutedoklch(0.97 0 0) 1.1:1oklch(0.269 0 0) 1.3:1
--muted-foregroundoklch(0.54 0 0) 5.1:1oklch(0.708 0 0) 7.6:1
--accentoklch(0.97 0 0) 1.1:1oklch(0.269 0 0) 1.3:1
--accent-foregroundoklch(0.205 0 0) 17.9:1oklch(0.985 0 0) 19.0:1
--destructiveoklch(0.56 0.245 27.325) 5.0:1oklch(0.704 0.191 22.216) 6.8:1
--destructive-foregroundoklch(0.985 0 0) 1.0:1oklch(0.145 0 0) 1.0:1
--successoklch(0.527 0.154 150.069) 4.9:1oklch(0.792 0.209 151.711) 11.1:1
--success-foregroundoklch(0.985 0 0) 1.0:1oklch(0.145 0 0) 1.0:1
--warningoklch(0.555 0.163 48.998) 5.1:1oklch(0.828 0.189 84.429) 11.5:1
--warning-foregroundoklch(0.985 0 0) 1.0:1oklch(0.145 0 0) 1.0:1
--borderoklch(0.922 0 0) 1.3:1oklch(1 0 0 / 10%) 1.3:1
--inputoklch(0.64 0 0) 3.4:1oklch(0.55 0 0) 4.1:1
--ringoklch(0.64 0 0) 3.4:1oklch(0.556 0 0) 4.2:1

--radius is 0.625rem. As in shadcn, Tailwind’s radii are derived from it: rounded-lg is --radius, rounded-md and rounded-sm are 2px and 4px smaller, and rounded-xl is 4px larger.

Spacing, type, shadows and motion use Tailwind’s own scales.

flootlets 0.2.3 · Changelog