Repository navigation
Test(CSS): Pin support for all CSS color functions in variables - #424
Merged
Merged
Conversation
|
@0Miles is attempting to deploy a commit to the Aoyue Team on Vercel. A member of the Team first needs to authorize it. |
Issue asked variables to support all CSS color functions (lab/lch/oklch/etc). The engine already does — core.ts:resolveVariables parses any function name matching the color-function regex (color, color-contrast, color-mix, hwb, lab, lch, oklab, oklch, rgb, hsl, light-dark) into a typed color variable with proper space and alpha. This commit pins that contract with regression tests. No source changes. - 12 test cases: rgb, hsl, hwb, lab, lch, oklab, oklch, color() with srgb / display-p3 / rec2020, alpha alias propagation across an oklch variable, color-mix preservation - Real Chrome verification: bg:primary with color.primary: 'oklch(0.5 0.15 240)' produces oklch backgroundColor at runtime Closes master-co#346
0Miles
force-pushed
the
feat/346-color-function-variables
branch
from
April 30, 2026 19:04
08211f5 to
4562f58
Compare
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.
Closes #346.
Summary
Issue asked variables to support all CSS color functions (lab/lch/oklch/etc). The engine already does — `core.ts:resolveVariables` parses any function name matching the color-function regex (`color | color-contrast | color-mix | hwb | lab | lch | oklab | oklch | rgb | hsl | light-dark`) into a typed color variable with proper space and alpha. This PR pins that contract with regression tests so it can't drift silently.
Changes
No source code changes — verify-and-pin commit.
Testing
12/12 tests pass. Real Chrome verification: `bg:primary` with `color.primary: 'oklch(0.5 0.15 240)'` produces `backgroundColor: "oklch(0.5 0.15 240)"` at runtime.