Repository navigation
chore(theme editor): a status border is measured like the icon, so its own exemption and note go - #13185
chore(theme editor): a status border is measured like the icon, so its own exemption and note go#13185josephfarina wants to merge 1 commit into
Conversation
…s own exemption and note go The status border and icon take the same search (the fill's shade, the page grounds, 3:1), so a border that reads at no shade always comes with an icon that reads at no shade, and the role keeps the base theme's colors. The border's exemption from that rule and the 'border under 3:1' wording never applied.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The CI workflow for this head was cancelled before its build and test jobs ran; Lint and the CLI smoke test passed.
The status border and icon take the same shade search, so letting a border that reads at no shade send its role to the base theme's colors changes no output, and the why doc now lists only what the code can report. Nothing needs to change in the code; the next step is a green CI run on this head.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the editor and Core's palette source measure a status border like its icon. Verified:
packages/core/src/palette/derive-look.ts:826-831and the generated copy atpackages/cli/api/theme/palette/generate/derive-look.mjs:979-984. - Claim: a role whose border reads at no shade keeps the base theme's colors, as an icon already does. Verified:
derive-look.ts:959-972. - Claim: every border and icon take the same search, so no theme output changes. Verified:
derive-look.ts:959-964; the base and head engines return identical results on 4,000 generated inputs, and all seven published themes build identical CSS. - Claim: user impact is none; the editor writes the same colors. Verified by the same evidence.
- Claim: the search is the nearest shade to the fill's that reads at 3:1 on the page. Verified:
derive-look.ts:959-964, with the 3:1 floor at line 161. - Claim: the border's exemption and the "a border under 3:1" wording could never apply. Verified: the base's flag and doc wording, unreachable because of the shared search.
- Claim: the CLI's copy of the palette engine is regenerated. Verified:
node scripts/generate-cli-palette-engine.mjs --checkpasses. - Claim: the listed tests pass. Verified: 11 files, 159 tests.
- File
.changeset/editor-status-border-like-icon.md: clear. - File
packages/core/src/palette/derive-look.ts: clear. - File
packages/cli/api/theme/palette/generate/derive-look.mjs: clear.
…e icon, so its own exemption and note go
- #12742 fix(cli): a padding of two to four lengths where only one works is written as its sides Author: @josephfarina - #13185 chore(theme editor): a status border is measured like the icon, so its own exemption and note go Author: @josephfarina
|
Landed in #13189. |
User impact
None. The theme editor writes the same colors before and after this change.
The change
The editor derives a status role's border and icon with the same search: the nearest shade to the fill's that reads at 3:1 on the page. So a border that reads at no shade always comes with an icon that reads at no shade, and that role keeps the base theme's colors. The border had its own exemption from that rule, and the
whydoc named "a border under 3:1" as a give-up; neither could ever apply. This removes the exemption and the wording, and regenerates the CLI's copy of the palette engine.Testing
node scripts/generate-cli-palette-engine.mjs --checkCI=1 pnpm vitest run --project node packages/cli/api/theme/palette/generate packages/cli/api/theme-edit/theme-stress.test.mjs packages/cli/api/theme-edit/theme-category-colors-follow-the-look.test.mjs packages/cli/api/theme-edit/theme-status*.test.mjspreflight: pass c8364bc