refactor(styles): ship the theming mechanism and one default palette - #2
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The package ships the theming mechanism and one default palette instead of a catalogue of one product's palettes.
styles/themes/keepsorange-lightandorange-dark, the Lablup brand default. The eightbliss,glass,reverieandstainedstylesheets are removed.styles/base.cssnow carries the orange-light values for the 55 tokens a theme defines, so the default palette and the one shipped theme agree.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-colorPrimaryis written as#ff7a00in some components and#8b5cf6in others. No default makes the fallbacks agree, sobase.cssnow states that measurement rather than the earlier claim that one divergence was the visible one.One consequence worth naming:
--token-colorLinkHoveris 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:boundarypassed.base.cssships 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 verifygreen./styles/themes/*.cssexport pattern still resolves, now to the two orange filesBreaking
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.