Define the lvl0 palette and ship it as @lvl0/ui #2
Labels
No labels
bug
ci
docs
enhancement
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference: lvl0/ui#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
There is no single source of truth for the lvl0 visual style. It currently exists as three
divergent copies, reverse-engineered from each other:
incr/incr/resources/css/app.cssbuckets-old/resources/css/app.css--radius: 0buckets-budget/frontend/src/theme.cssConcrete drift already observed:
7segment.wofffont is duplicated in ≥3 repos (see #1)incrloads the font by relative path with a comment explaining that an absolute/fonts/path 404s against the Vite dev server —bucketsuses the absolute path thatcomment warns against
anagram-finder/webon 2026-08-23 and is currently defined only thereCanonical palette
Primary is unchanged from
buckets-budget, which is the fullest existing implementation.Bordeaux is new and should be adopted as the official secondary.
--color-primaryoklch(0.637 0.237 25.331)red-500.--color-bordeauxoklch(0.258 0.092 26.042)red-950.--color-backgroundoklch(0.1 0 0)--color-cardoklch(0.12 0 0)--color-mutedoklch(0.2 0 0)--color-muted-foregroundoklch(0.5 0.1 25)--color-destructiveoklch(0.577 0.245 27.325)--radius0Chart colours (
--chart-1…--chart-5) carry over frombuckets-budgetas-is.Utilities to ship
.glow-red— box-shadow bloom in primary, with:hoverand:focussteps.glow-red-text— two-layer text-shadow, for borderless headings..glow-redhaloes thebox, so it smudges when used on text
.glow-bordeaux— with:hover/:focus.glow-bordeaux-line— two-layer variant for 1–2px rules, where a single wide shadow on ahairline just fades out
.scrollbar-red— covers bothscrollbar-color(Firefox) and::-webkit-scrollbar.font-digital— 7-segment face. Numerals only; letters render badlyNon-obvious rule worth encoding
.glow-bordeauxdeliberately emits primary-tinted light, not bordeaux. Bordeaux isoklch(0.258 …)— too dark to bloom against a near-black ground, so a bordeaux halo isinvisible. Dim element, brighter glow, as CRT phosphor behaves. Anyone reimplementing this
from scratch will get it wrong once.
Package shape
Consumer usage:
Licence
MIT, deliberately diverging from the
AGPL-3.0-onlyused across the other lvl0 repos.This package is meant to be imported: AGPL's copyleft would attach to any consuming work,
which makes it unusable to anyone outside lvl0 and defeats the point of publishing it.
Design systems built for consumption (Primer, Carbon, Polaris, Tailwind) are MIT or Apache-2.0
for this reason. AGPL stays correct for the application repos, where §13 does real work.
Adoption
New projects only.
anagram-finder/webis the first consumer — itsresources/css/app.cssalready defines these tokens locally and can switch to the import.incr,buckets, andffrkeep their current CSS until touched anyway; retrofitting them isexplicitly out of scope.
Depends on
Acceptance
@themeblockanagram-finder/webbuilds against the package with no visual changeLICENSEpresentDone —
v0.1.0tagged and installableAll acceptance criteria verified:
@themeblock —src/theme.css, 12 tokenssrc/utilities.cssanagram-finder/webbuilds against the package with no visual change — diffed thecompiled CSS against a pre-change baseline: 24 of 24 lvl0 utility rules byte-identical,
zero differing. The font still fingerprints into the build (
7segment-Cl-sqT19.woff), nowresolved from the package rather than a local copy.
LICENSEpresentgit+ssh://git@forge.lvl0.xyz:2222/lvl0/ui.git#v0.1.0into a clean throwaway project with nosymlink. All five files present,
fonts/OFL.txtalongsidefonts/7segment.woff.Distribution is a tag-pinned git dependency rather than an npm registry publish. For internal
consumers that is sufficient; a registry publish can follow if the package is ever consumed
outside lvl0.
Consumer change
anagram-finder/web@49fe4bf— imports@lvl0/uiinresources/css/app.css, drops thelocal token and utility blocks, and deletes
resources/fonts/entirely. That also closesthe OFL exposure noted on #1:
webno longer redistributes the font at all, so licence textand font travel together in the package.
Note
While extracting, two scrollbar rules were tidied (
#000→var(--color-background), and acolor-mixhover). The no-visual-change diff caught both and they were reverted to matchweb's originals. Worth revisiting as a deliberate change later —--color-backgroundis themore correct reference now that the token exists.
Not adopted
incr,buckets, andbuckets-budgetkeep their own divergent CSS, as scoped. The threecopies collapse only when those projects are touched.