fix(design-system): glass-panel rules now actually apply backdrop-filter #98
No reviewers
Labels
No labels
agent-context-drift
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: rstillwell/deckhearth#98
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-glass-panel-backdrop-stripped"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why this exists
After PR #97 promoted, you reported
https://deckhearth.com/dashboardstill showed flat warm panels. Browser CDP diagnostic confirmed: the deployed.glass-panelrule has the background and border, but nobackdrop-filterdeclaration at all. Without blur the translucent overlay just lets the body color show through nearly-fully — looks identical to a solid panel.Root cause — two compounding Lightning CSS (Next 16 default optimizer) quirks
backdrop-filter: blur(var(--X)) saturate(var(--Y))is silently stripped. Lightning CSS doesn't understandvar()references nested inside function arguments. Tailwind's own.backdrop-blur-*utilities survive because they wrap the entireblur(...)expression in a single CSS var (--tw-backdrop-blur), not the radius value alone. Same exact bug already emptied.mobile-nav-backdropin production at some earlier point —getComputedStyleconfirms the rule has nobackdrop-filtereither.Identical-value duplicate prefix triggers a buggy de-dup. When
backdrop-filterand-webkit-backdrop-filterare both written with byte-identical values, Lightning CSS de-duplicates and keeps only the-webkit-form. Modern Chrome/Edge/Firefox ignore the webkit prefix, so the blur never applies.Fix
blur(12px) saturate(180%)instead ofblur(var(--glass-blur-mid)) saturate(var(--glass-saturate)). The--glass-blur-*tokens stay in:rootfor the<GlassSurface>JSX primitive (inlinestyle={{ backdropFilter: ... }}is unaffected by Lightning CSS).backdrop-filterand let Lightning CSS's autoprefixer add the-webkit-based on browserslist (ios_saf <18 still needs it).Verified locally with
npm run build:```css
.glass-panel {
background-color: var(--glass-surface-mid);
-webkit-backdrop-filter: blur(12px) saturate(180%);
backdrop-filter: blur(12px) saturate(180%);
border: 1px solid var(--rim-light-outer);
box-shadow: var(--elevation-ambient), inset 0 1px 0 var(--rim-light-inner);
}
```
Both forms present, modern unprefixed wins de-dup.
Note added to source
The CSS now has a maintainer comment above the two utility classes documenting both quirks so the next agent doesn't reintroduce the bug.
Test plan
https://deckhearth.com/dashboard— stat cards / recent-lists card should now actually blur the background.Made with Cursor
The latest updates on your projects. Learn more about Vercel for GitHub.
Pipeline Health
Build + CI gates
Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).
Role reports
See individual comments above for details. This rollup updates automatically.
Visual Diff
Screenshots and diffs uploaded as artifacts: view run
If intentional changes: update snapshots locally with
npx playwright test --project=visual --update-snapshotsand commit.