Repository navigation
[3.1] Any colour token at any opacity, plus a brand-to-accent gradient - #568
Merged
Merged
Conversation
…adient
Colour props take an opacity after a slash: background="brand/12",
border="accent-strong/40", solid="brand-strong/60". A bare tone is its
alpha colour (new --{tone}-alpha token; brand/15 equals brand-alpha-weak),
a tone-weight is the prop's own token. The server writes a color-mix()
inline, so there is no class per step and the box stays a server component.
background="gradient" (and gradient/16) draws brand to accent, turned by
--gradient-angle. New tokens: --{tone}-alpha, --accent-color-*,
--gradient-brand-accent. cssColor (StyleScope, Background, charts) reads
the same forms. Docs section in basics/color, demo at /alpha-tokens.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtzxGSCQk1M71BeZLgj
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtzxGSCQk1M71BeZLgj
… rules Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtzxGSCQk1M71BeZLgj
lorant-one
marked this pull request as ready for review
November 21, 2026 12:20
…ved to internal/alpha) fx holds a word-for-word copy of core's cssColor; it now imports the opacity helper from a sibling internal/alpha.ts, copied to fx with its own parity test. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtzxGSCQk1M71BeZLgj
…B on Flex-based entries) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtzxGSCQk1M71BeZLgj
lorant-one
added a commit
that referenced
this pull request
Nov 23, 2026
#568 widened colour props (ColorAlpha, gradient) and #579 added WorkspaceSwitcher without regenerating ai/ and bundle-size.json, so the harness agents read described the old API. The catalog cap moves to 32,500 for 3.1's new pieces. Claude-Session: https://claude.ai/code/session_016gNJtx8NozwfTMFAJUwVuh Co-authored-by: Claude <[email protected]>
27 tasks done
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.
Requested by Lorant · project thread
Prototype. Don't merge without Lorant's go.
Why
3.0 has three alpha steps per tone (weak, medium, strong = 15, 30, 50%) and nothing between them. On the ATOR site, glows needed 12, 16 and 22%, so hand-made
--my-colourvariables got hard-coded, which is exactly what the agent rules forbid.What
Props. Colour props take an opacity after a slash:
background,solid,borderand the border sides, onFlex/Row/Column/Gridand everything built on them."brand/N"reads the new--brand-alphatoken, the colour the alpha scale is drawn from, sobrand/15is exactlybrand-alpha-weak, and the named steps become presets on one continuous scale."brand-strong/N"reads the same variable the class would (--brand-background-strongonbackground,--brand-border-strongonborder).color-mix(in srgb, <token> N%, transparent)inline, the way the alpha tokens are made. There's no class per step, the box stays a server component, and it follows theme, scheme andStyleScope. A user'sstylestill wins.ColorAlpha = \${ColorScheme | Colors}/${number}``, so autocomplete on the base still works.Free colour props.
cssColor(StyleScope, Background, charts, gauges) reads the same forms:brand/12,brand-strong/40,--my-hue/50. A rawrgb(0 0 0 / 50%)keeps its own slash.Tokens (foundations).
--{tone}-alphafor all seven tones, in both themes.--accent-color-strong|medium|weak, mirroring--brand-color-*(the hue, whateverdata-solidsays).--gradient-brand-accent(135°) for stylesheets, and a.gradient-backgroundutility whose angle follows--gradient-angleon the element.CSS pattern (artwork and keyframes):
color-mix(in srgb, var(--brand-alpha) 16%, transparent). Now documented in basics/color.Options considered
alpha-subtle,alpha-faint…): still a fixed set, so the next design needs another, and the token surface grows.backgroundOpacityprop: it pairs badly withborder/solid(one opacity prop per colour prop), andopacityalready means element opacity..brand-background-12): 7 tones × 3 roles × 101 steps, and the CSS bloats.@property --alphainherited var on every class: it touches every generated class, and an inheriting var leaks into children.color-mix. It's one mental model (Tailwind users already read/12) with no new classes, and it works in breakpoint borders and free colour props too.Not in this prototype
onBackground/onSolidtext at an opacity. Text colour should stay on contrast-checked tokens, so I left it out on purpose.background/solidinside breakpoint objects. They had no breakpoint support before either. Breakpoint borders do take it.Checks
tsc --noEmitin core: 0 errors.color-alpha.test.tsxwith 11 tests.once-ui.tokens.jsonwas re-exported.validate-ai-codecheck finds no issues in the demo page./mnt/project-files/3.1/alpha-tokens/). The demo is atapps/dev/alpha-tokens, and docs are inbasics/color, "Any colour at any opacity".The AI spec and catalog are not regenerated here, per the release-cycle rule.
Generated by Claude Code