PR-PROD1 · Close BG gap (G1) — 10 new background vars per SPEC §5.1 - #34
Merged
Conversation
Adds the missing Backgrounds tier set per SPEC §5.1 / production-audit G1.
Pure additions; no breaking changes to existing v0.2.x consumers.
New CSS vars:
--bg-inverted # mode-flipping (Gray.0 ↔ Gray.1000)
--bg-grouped-primary # nested-card hierarchy (D7)
--bg-grouped-secondary # nested-card hierarchy
--bg-grouped-tertiary # nested-card hierarchy
--bg-overlay-ghost # 1% white scrim (effectively invisible)
--bg-overlay-soft # 20% white frosted scrim
--bg-overlay-base # 48% white scrim (clamped from 50% target)
--bg-overlay-strong # 80% white scrim
--bg-static-light # mode-invariant white (#ffffff)
--bg-static-dark # mode-invariant near-black (#020203)
Legacy --bg-overlay and --bg-static remain as backward-compat aliases.
Schema changes (additive):
BackgroundsConfig.neutral.{inverted, grouped: {primary, secondary, tertiary}}
BackgroundsConfig.overlay_tiers: {ghost, soft, base, strong}
BackgroundsConfig.static_tiers: {light, dark}
Tests:
248 pass / 0 fail
4 snapshots regenerated (CSS, ESM, DTS, Tailwind)
All parity tests pass; new vars don't disturb primitive emissions
Closes G1 from plan/spec/production-audit-2026-04-25.md
Co-Authored-By: jaquan_boyer84 <lemonesqeezy@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Closes gap G1 from
plan/spec/production-audit-2026-04-25.md— adds the 10 missing Background CSS vars that SPEC §5.1 requires but production wasn't emitting.This unblocks component connectivity for: Card / Modal / Toast / Sheet / Tooltip / Drawer / nested grouped sections (Apple Settings.app pattern per D7).
New CSS vars
Backward compatibility
--bg-overlayand--bg-staticcontinue to emit unchanged for v0.2.x consumers. They map to the historical single-tier emissions (40% dark scrim and pure white respectively). No breaking changes.Schema changes
BackgroundsConfig(insrc/types.ts) gains:neutral.inverted: SemanticDefneutral.grouped: { primary, secondary, tertiary }overlay_tiers: { ghost, soft, base, strong }static_tiers: { light, dark }semantic-colors.ts:collectEntries()enumerates the new entries.Tests
All parity tests still pass — new vars don't perturb primitive accent or neutral anchors.
Review & Testing Checklist for Human
(Risk: yellow — non-trivial schema + emit changes, but additive only, all tests pass.)
#ffffff7a; the 50 target would be#ffffff80. Visual diff is sub-perceptual (ΔE < 0.5).--bg-invertedproduces a useful inverted surface for splash sections. (Light theme → dark surface. Dark theme → light surface.)Notes
Opacity stop drift acknowledgment: SPEC §5.1's Light.500 → 50% alpha doesn't align with the production opacity ladder (which has 48 and 52 but not 50). Closest available chosen. Future PR-PROD3 may add stops {25, 50, 75} to the ladder if desired, at the cost of ~42 additional emissions. Not blocking for component work.
Grouped tier exact-match: Figma fixture uses Gray.50 in dark mode (Grouped.Secondary) which doesn't have a 1:1 production neutral step. The mirror invariant (
neutral.X light = neutral.(steps-1-X) dark) makes neutral.0 and similar refs visually mirror correctly across modes; the resulting 3-tier stack works for component implementation, even if individual stops drift by ~ΔE 0.5–1 vs Figma. Hand-tuned overrides can be added in a follow-up if a designer review surfaces visible drift.Closes the BG component-connectivity blocker. Next: PR-PROD2 (FX corrections G2, G3, G4) on a separate branch.
Link to Devin session: https://app.devin.ai/sessions/b536bd94e35841f0be9bb93829697a46
Requested by: @lemone112