Skip to content

0028 spotstrap theme

github-actions[bot] edited this page Nov 19, 2026 · 1 revision

The theme comes from Spotstrap, with shadcn's colour names

Status: accepted · Implementation: done · Date: 2026-11-19 · Supersedes: 0013

From LibreLifts ADR 0037. Supersedes only the part of 0013 about where the theme lives and what its colours are called. Components are still not shared, each side's components are still its own (0027), fonts are still declared by each app, and only Uniwind's free tier is used. Moving the app's components to Spotstrap's recipes is a later change. Built 2026-11-19 with Spotstrap 0.1.3: 126 class uses and 5 CSS variables renamed; the colour files outside CSS read @kodentuzo/spotstrap/tokens/librelifts.json, whose hex values match the old ones exactly, so the generated icons did not change. The website's colours are identical and the app's screens are pixel-identical, light and dark; on the website, text without a size grew from 16px to 17px.

Context

0013 put the theme in packages/ui/src/theme.css, with names of the project's own: bg, text, line, muted, accent, accent-ink and fail. The same maintainer now publishes Spotstrap (@kodentuzo/spotstrap), a Tailwind 4 theme and class library made for phones, and is moving every project of theirs onto it. LibreLifts, which LibreBars was copied from, has moved already.

Spotstrap writes its themes in the format this repository already uses: static values in @theme, with the colours under the light and dark variants, so that Uniwind reads the same file as the website. It ships a librelifts theme with the colours LibreBars uses, converted to oklch, and a native.css for React Native that holds its sizes and type scale without the web's base styles. Its colours use shadcn's names (background, foreground, primary, muted-foreground, destructive, border…), which the components shadcn and React Native Reusables offer already expect. 0027 gave those names as one reason not to copy React Native Reusables yet.

Two of shadcn's names are also this project's names, with other meanings: shadcn's muted is a background, and its accent is a quiet hover colour, not the brand colour.

Decision

  • The theme comes from Spotstrap's librelifts theme. The website imports @kodentuzo/spotstrap/tailwind.css and themes/librelifts.css; the app imports @kodentuzo/spotstrap/native.css and the same theme, after Uniwind.
  • Colour values live in Spotstrap. A change to the colours is made in its theme and reaches the website and the app by updating the package. No colour value is written in this repository, except where a file cannot read CSS (the favicon, the web manifest, the generated icons, app.json, the theme-color meta tag); those take the hex values from Spotstrap's tokens.
  • Class names are shadcn's. bg → background, text → foreground, line → border, muted → muted-foreground, accent → primary, accent-ink → primary-foreground, fail → destructive. surface and raised keep their names, which Spotstrap has too. All of them are renamed at once, so that no old text-muted or bg-accent is left to pick up shadcn's meaning.
  • packages/ui/src/theme.css is deleted. packages/ui keeps the helper that joins class names.
  • Spotstrap is installed at an exact version, and pnpm's minimum release age does not apply to it: it is the maintainer's own package, published from CI with provenance.
  • Components do not change. The app's own Button, Field, SetRow and the rest stay as 0027 built them, with the new names.

Consequences

  • The colours do not change: Spotstrap's theme was converted from these.
  • On the website, Spotstrap's base styles apply: body text is 17px (Apple's body size) instead of the browser's 16px wherever no size is set, and borders default to the theme's border colour. global.css keeps its own focus outline.
  • A colour change is now a release of another package. That is slower than editing a file here, and it is the point: LibreBars and LibreLifts stay alike.
  • Spotstrap's muted and accent exist. Writing text-muted builds and shows the wrong colour; review has to catch it, since nothing else does.
  • Components copied later from shadcn or React Native Reusables need no renaming of colours.
  • The theme names web fonts with fallbacks, which React Native cannot use. The app sets no font yet; when it does, it sets --font-sans and the others after the theme.

LibreBars

Clone this wiki locally