Skip to content

refactor(styles): ship the theming mechanism and one default palette - #2

Merged
inureyes merged 1 commit into
mainfrom
refactor/default-theme-only
Aug 5, 2026
Merged

refactor(styles): ship the theming mechanism and one default palette#2
inureyes merged 1 commit into
mainfrom
refactor/default-theme-only

Conversation

@inureyes

@inureyes inureyes commented Aug 5, 2026

Copy link
Copy Markdown
Member

What

The package ships the theming mechanism and one default palette instead of a catalogue of one product's palettes.

  • styles/themes/ keeps orange-light and orange-dark, the Lablup brand default. The eight bliss, glass, reverie and stained stylesheets are removed.
  • styles/base.css now carries the orange-light values for the 55 tokens a theme defines, so the default palette and the one shipped theme agree.
  • The 113 token names, the structural values (spacing, radius, motion, type scale, focus ring, z-index) and every component are unchanged.

The removed files were byte-identical to files the source product already owns, verified line by line, so nothing is lost. A product with its own visual identity defines its own [data-theme] blocks over the same token names and ships them itself.

On choosing orange

It is a brand decision, and the obvious technical argument for it does not survive measurement. The components' inline var() fallbacks agree with orange-light in 135 of the 252 references to a theme-defined token and with stained-light in 168, and --token-colorPrimary is written as #ff7a00 in some components and #8b5cf6 in others. No default makes the fallbacks agree, so base.css now states that measurement rather than the earlier claim that one divergence was the visible one.

One consequence worth naming: --token-colorLinkHover is one of the twelve tokens no theme defines, so the default palette now has an orange link with a purple hover. That is what the orange theme already renders in the source product, and correcting it is the visual change the extraction deliberately left out of scope.

Disclosure guard

While writing this I put a product name into the token stylesheet, it wrapped across two comment lines, and check:boundary passed. base.css ships inside the tarball, so that would have gone public.

The scan now blanks comment markers in place before matching, so a pattern can span the wrap while every offset still maps back to its original line. Verified both ways: clean on this branch, and it reports the wrapped name when reintroduced.

Verification

  • pnpm run verify green
  • Packed files 148 to 140, exactly the eight removed stylesheets
  • The ./styles/themes/*.css export pattern still resolves, now to the two orange files

Breaking

Removing a stylesheet path is breaking under the versioning policy. It lands now, while the package is an alpha with one consumer mid-migration and no other consumer has adopted it.

The package carried ten stylesheets covering five theme families, which are
one product's visual identities rather than anything shared. They were
byte-identical copies of files that product already owns, so a consumer with
its own identity gained nothing from them and every future family would have
had to land here first.

`styles/themes/` now keeps `orange-light` and `orange-dark`, the Lablup brand
default, and `styles/base.css` carries the orange-light values for the 55
tokens a theme defines so the default palette and the shipped theme agree. The
113 token names, the structural values, and every component are unchanged. A
product defines its own `[data-theme]` blocks over the same names and ships
them itself.

Choosing orange is a brand decision, not a technical one, and the obvious
technical argument for it does not hold: the components' inline var()
fallbacks match orange-light in 135 of the 252 references to a theme-defined
token and stained-light in 168, and `--token-colorPrimary` alone appears as
`#ff7a00` in some components and `#8b5cf6` in others. No default makes those
fallbacks agree, so the header comment now states the measurement instead of
the earlier claim that one divergence was the visible one.

Also closes a hole in the disclosure guard. A product name that wraps across
two comment lines reads and ships as one name but arrives at a line-by-line
scan as two harmless halves, which is exactly how one got into the token
stylesheet in this change and past the check. The scan now blanks comment
markers in place, so a pattern spans the wrap while every offset still maps
back to its line.

Removing a stylesheet path is breaking under the versioning policy, which is
why it lands now, while the package is an alpha with one consumer mid
migration.
@inureyes
inureyes merged commit 54292fb into main Aug 5, 2026
3 checks passed
@inureyes
inureyes deleted the refactor/default-theme-only branch August 5, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant