Skip to content

fix(css): backdrop-filter order so prod build doesn't drop the standard#18

Merged
rulkens merged 1 commit intomainfrom
fix/backdrop-filter-order
May 6, 2026
Merged

fix(css): backdrop-filter order so prod build doesn't drop the standard#18
rulkens merged 1 commit intomainfrom
fix/backdrop-filter-order

Conversation

@rulkens
Copy link
Copy Markdown
Owner

@rulkens rulkens commented May 6, 2026

Summary

Production CSS was silently missing the unprefixed backdrop-filter on every glassmorphic surface (Panel, FullCard, CompactCard, InfoTip, ScaleBar, SearchTrigger, CommandPalette). Result: panels rendered without their blur backdrop in deploy, even though dev server worked.

Root cause

Source order put the standard property FIRST and the vendor-prefixed form LAST:

backdrop-filter: blur(var(--blur-X));         /* standard */
-webkit-backdrop-filter: blur(var(--blur-X)); /* vendor prefix */

esbuild's CSS minifier (Vite's default since v4) deduped the pair down to just the legacy -webkit- form. Dev served the un-minified source so both declarations were live and the standard property was applied. Prod served only -webkit-backdrop-filter, which Chrome has been quietly deprecating as an alias and Firefox never supported, so the blur effect disappeared.

Verified live before this PR: https://skymap.rulkens.com/assets/index-IiTJi-fy.css contains 6 -webkit-backdrop-filter declarations and zero unprefixed backdrop-filter.

Fix

Swap each pair so -webkit- is first and the standard is last:

-webkit-backdrop-filter: blur(var(--blur-X));
backdrop-filter: blur(var(--blur-X));

This is the universally-recommended ordering for vendor-prefixed CSS. After the swap, the minifier keeps both declarations — modern browsers (Chrome 76+, Firefox 103+, Safari 18+) use the standard; older WebKit falls back to the prefix.

A short comment on Panel.module.css explains the rationale; the other six files just point back to it.

Test plan

  • npm run build clean.
  • Inspected fresh dist/assets/index-*.css — both backdrop-filter:blur(var(--blur-X)) and -webkit-backdrop-filter:blur(var(--blur-X)) are present for both --blur-panel and --blur-card.
  • Deploy + visually confirm: glassmorphic blur visible behind every panel and card on https://skymap.rulkens.com.

🤖 Generated with Claude Code

…the standard property

Production CSS was silently missing the unprefixed `backdrop-filter`
on every glassmorphic surface (Panel, FullCard, CompactCard, InfoTip,
ScaleBar, SearchTrigger, CommandPalette).  Cause: source order put
the standard property first and `-webkit-` last, and esbuild's CSS
minifier deduped the pair down to just the legacy prefixed form.
The dev server didn't minify, so blur worked there.

Swap each pair so `-webkit-backdrop-filter` is first and the standard
is last.  After this, the minifier keeps both declarations: modern
browsers (Chrome 76+, Firefox 103+, Safari 18+) use the standard;
older WebKit falls back to the prefixed form.

Verified by `npm run build`: the new dist/assets/index-*.css contains
both `backdrop-filter:blur(var(--blur-X))` and
`-webkit-backdrop-filter:blur(var(--blur-X))` for every surface.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
skymap 5f6409e Commit Preview URL

Branch Preview URL
May 06 2026, 11:56 AM

@rulkens rulkens merged commit 9dc8154 into main May 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant