refactor(web): give every card a .frost class, wrap the docs rail in one, and make the blur work again - #79
Merged
Merged
Conversation
… again The blur was already applied, as a hand-maintained selector list in global.css. A new card had to be added to that list to get frosted, which is how .cta__panel, .step and .clog__cta ended up without it, and how .arch__card, .req__card and .scut__row stayed on it long after the rules they named were deleted. Replace the list with a .frost class carried in the markup. .btn, .pill and .cta__code stay on the rule: they always frost and are not cards, so tagging every call site would be noise. Faq.astro's hand-rolled copy of the same two declarations goes away with it. Finding the cards by name missed two of them — .step and .clog__cta are card-shaped but named neither *card* nor *panel*, and .clog__cta is gradient-backed so it does not match on `background: var(--surface)` either. They were found by shape instead: border-radius plus a 1px border. The blur itself had stopped rendering outside Safari. esbuild's CSS minifier treats backdrop-filter and -webkit-backdrop-filter as one property and keeps whichever is written last; every declaration here was written standard-first, so the build shipped only the prefixed form — which Chrome has since removed and Firefox never had. The built CSS carried 0 unprefixed declarations against 5 prefixed, and Chrome's parser dropped them all, taking the nav glass, .filter and .qa-list with it. Swap all five pairs to prefix-first so the standard property survives. Safari <18 loses the blur, where before everyone but Safari had. The order reads like a typo, so it is commented where it lives and noted in web/CLAUDE.md for the two scoped blocks far from that comment. Verified in Chrome 152 against the built output: nav is back to blur(18px) saturate(1.6), every card computes blur(2px), and a diff of the built HTML against main shows no card lost the class and three gained it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqUXC6nL5bayNL1cTrnFzw
The rail was the one navigation surface on the site drawn as bare text on the page background, while everything beside it — the hub's page grid, the changelog entries, the FAQ — sat on a card. It reuses the shared patterns rather than restating them: .card carries the radius, surface and border, .frost the blur, and the only new declaration is the rail's own padding. The card goes on .docsnav rather than on .docsnav__panel inside it. .docsnav is the sticky scroll container, so the frame stays put while a long index scrolls within it; on the panel the borders would have scrolled out of view with the content. Below 900px it is undone. There the rail collapses to a single control and .docsnav__toggle already carries its own deliberately opaque surface, so a card would frame a button that is one already. The blur has to be undone by hand with it: .frost is a class, not a media query, and over a transparent box it would smear a band of the article behind the toggle. Checked in Chrome at three states — desktop, mobile collapsed, mobile open — plus a short viewport where the index overflows and scrolls inside the frame. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqUXC6nL5bayNL1cTrnFzw
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.
The ask was a class for
backdrop-filter: blur(2px)used on every card. Theblur turned out to already exist — as a hand-maintained selector list in
global.css— and to have stopped rendering in every browser but Safari.The class
A new card had to be added to that selector list to get frosted, which is how
.cta__panel,.stepand.clog__ctaended up without it, and how.arch__card,.req__cardand.scut__rowstayed on it long after the rulesthey named were deleted.
The list is now a
.frostclass carried in the markup..btn,.pilland.cta__codestay on the rule — they always frost and are not cards, so taggingevery call site would be noise.
Faq.astro's hand-rolled copy of the same twodeclarations goes away with it.
Searching for cards by name missed two:
.stepand.clog__ctaare card-shapedbut named neither
*card*nor*panel*, and.clog__ctais gradient-backed soit does not match on
background: var(--surface)either. Both were found byshape instead —
border-radiusplus a1pxborder.The docs rail becomes a card
The rail was the one navigation surface on the site drawn as bare text on the
page background, while the hub's page grid, the changelog entries and the FAQ
all sat on a card. It now reuses the shared patterns rather than restating them:
.cardcarries the radius, surface and border,.frostthe blur, and the onlynew declaration is the rail's own padding.
The card sits on
.docsnav, not on.docsnav__panelinside it —.docsnavisthe sticky scroll container, so the frame stays put while a long index scrolls
within it. On the panel the borders would have scrolled away with the content.
Below 900px it is undone: there the rail collapses to a single control and
.docsnav__togglealready carries its own deliberately opaque surface. The blurhas to be undone by hand along with it —
.frostis a class, not a media query,and over a transparent box it would smear a band of the article behind the
toggle.
The blur was dead outside Safari
esbuild's CSS minifier treats
backdrop-filterand-webkit-backdrop-filterasone property and keeps whichever is written last. Every declaration here was
written standard-first, so the build shipped only the prefixed form — which
Chrome has since removed and Firefox never had. The built CSS carried 0
unprefixed declarations against 5 prefixed, and Chrome's parser discarded all of
them, taking the nav glass,
.filterand.qa-listdown with the cards.All five pairs are now prefix-first, so the standard property survives
minification.
Tradeoff: Safari <18 loses the blur, where previously everyone but Safari
had lost it. The alternative that keeps both —
cssMinify: 'lightningcss'withbrowser targets, and deleting every hand-written prefix — is a larger change to
the CSS build; happy to do it instead if the Safari 16–17 slice matters more.
The ordering reads like a typo, so it is commented where it lives and noted in
web/CLAUDE.mdfor the two scoped blocks far from that comment.Verification
Against the built output in Chrome 152:
.navglassnoneblur(18px) saturate(1.6)noneblur(2px).filter,.qa-list,.btn,.cta__codenoneblur(2px)Built CSS went from 0 standard / 5 prefixed to 5 standard / 0 prefixed.
Diffing the built HTML against
main: no card lost the class, three gainedit (
.cta__panel,.step×4,.clog__cta).The rail was checked at three states — desktop, mobile collapsed, mobile open —
plus a short viewport where the index overflows and scrolls inside the frame.
Left alone deliberately:
.filter(a search input, not a card),.qa-list(plugin-generated — editing
rehype-faq-accordion.mjsdrags in the content-cachehazard for a cosmetic dedupe), and
.kbd__cli(a code block, sibling to thealready-frosted
.cta__code). All three still get the ordering fix.🤖 Generated with Claude Code
https://claude.ai/code/session_01WqUXC6nL5bayNL1cTrnFzw