Repository navigation
fix: expand 3-digit hex custom properties before token-name inversion - #102
Merged
Merged
Conversation
Vite/esbuild minifies a repeating 6-digit CSS custom property (#ffffff) to 3-digit (#fff) in production; the IR token->name inversion compared it against a consumer's 6-digit computed background, dropping the token name. Expand shorthand before comparing. Adds a browser IR test with positive/control/negative cases. typecheck clean; token-hex 2/2; ir+blueprint 49/49; build clean; diff --check clean.
Merged
3x-haust
added a commit
that referenced
this pull request
Jul 23, 2026
Bump all five manifests (package.json, .claude-plugin/plugin.json + marketplace.json, .codex-plugin/plugin.json, .agents/plugins/marketplace.json) 0.18.0 -> 0.19.0 and resync package-lock.json via scripts/bump.ts. Pushing the plugin.json version change to main triggers the Release workflow, which tags v0.19.0 and cuts the GitHub release with the merged-PR changelog. This release ships this session's harness-quality work merged since v0.18.0 (#102-#117): token-hex normalization; marketing register/ambition, colour+material carrier, and free-license photography floors; frame-before-build gate; Awwwards/FWA scout and showpiece load-scene ambition; section-granular reference composition and the per-section-fidelity transfer boundary; the staged showpiece scroll-scene evidence protocol (contract, browser capture, final-evidence enforcement, composer permission); macro-layout sketch divergence; the SLOP-COLORLESS machine check; and genuinely-divergent visual-direction enumeration. Full suite 1566 pass / 0 fail / 1 skip; build + typecheck clean.
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.
Problem
Vite/esbuild minifies a repeating 6-digit CSS custom property (
--paper: #ffffff) down to its 3-digit shorthand (#fff) in a production build. The IR token->name inversion incore/ir/dom.tscompared that raw custom-property value against a consumer's computedbackground-color, which always resolves to the full 6-digit form viatoHex. So a minified design token read as a false mismatch and silently lost its token name — a real bug in the design checker, not a page defect.Fix
Expand a 3-digit hex shorthand to its canonical 6-digit form before the value->name comparison. Ten lines; no behavior change for any already-6-digit or
rgb()value.Tests (positive + negative, per repo convention)
New
test/token-hex.test.tsrenders a real fixture through the browser IR path:--surface: #fffresolves to#FFFFFFand a consumer keepstoken: 'surface'(fails without the fix).--brand: #1f9d55is unaffected.#fefefeliteral staystoken: null— no fabricated attribution.Validation
npm run typecheckclean ·token-hex2/2 ·ir+blueprint49/49 ·npm run buildclean ·git diff --checkclean.Branched from
main; no release.