-
Notifications
You must be signed in to change notification settings - Fork 474
feat(ui): add gray scale and restructure Mosaic color tokens to match Figma #9699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d6591e9
565d4ab
4b3b744
308990b
a16e940
7b717e0
4127ab7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -59,7 +59,7 @@ Each part carries its stable slot class alongside the generated StyleX atoms and | |||||
| | `Banner.Label` | `neutral` \| `warning` \| `negative` | | ||||||
| | `Banner.Description` | `neutral` \| `warning` \| `negative` | | ||||||
|
|
||||||
| The fill is a 4% mix of the color's token rather than its `-faded` surface, so a banner tints whatever it sits on instead of painting over it, and it inverts with the token in dark mode. Retheme a color by overriding the token it reads — `--cl-color-negative`, `--cl-color-warning`, or `--cl-color-neutral` (plus `--cl-color-border`, which draws the neutral hairline) — and the fill, border, icon, and copy all move together. | ||||||
| Warning and negative paint the color's `-subtle` surface inside its `-border` hairline and use the saturated token for the icon and copy, so retheme one by overriding `--cl-color-negative-subtle`, `--cl-color-negative-border`, and `--cl-color-negative` (or the `warning` equivalents). Neutral has no subtle surface of its own: its fill is a 4% mix of `--cl-color-foreground` over whatever it sits on, and `--cl-color-border` draws its hairline. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Document the neutral wash with the correct token source. The new Describe the fill as the 4% Proposed documentation fix-Warning and negative paint the color's `-subtle` surface inside its `-border` hairline and use the saturated token for the icon and copy, so retheme one by overriding `--cl-color-negative-subtle`, `--cl-color-negative-border`, and `--cl-color-negative` (or the `warning` equivalents). Neutral has no subtle surface of its own: its fill is a 4% mix of `--cl-color-foreground` over whatever it sits on, and `--cl-color-border` draws its hairline.
+Warning and negative paint the color's `-subtle` surface inside its `-border` hairline and use the saturated token for the icon and copy, so retheme one by overriding `--cl-color-negative-subtle`, `--cl-color-negative-border`, and `--cl-color-negative` (or the `warning` equivalents). Neutral has no subtle surface of its own: its fill is the 4% `neutralAlpha` wash derived from `--cl-color-neutral`, and `--cl-color-border` draws its hairline.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this correct? where are we doing
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
ast-grep outline packages/ui/src/mosaic/tokens.stylex.ts --items all
ast-grep outline packages/ui/src/mosaic/components/banner/banner.styles.ts --items all
printf '\n--- neutralAlpha and color token definitions ---\n'
rg -n -C 12 -- '--cl-color-neutral|neutralAlpha|foreground:' packages/ui/src/mosaic/tokens.stylex.ts
printf '\n--- Banner neutral styles and imports ---\n'
rg -n -C 12 -- 'neutral|neutralAlpha|colorMix|backgroundColor' packages/ui/src/mosaic/components/banner/banner.styles.tsLength of output: 6561
color-mix(in oklab, var(--cl-color-neutral) 4%, transparent)The transparent result composites over the banner’s existing background. It is therefore a 4% neutral wash, not a 4% foreground wash. The documentation should reference You are interacting with an AI system. |
||||||
|
|
||||||
| --- | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.