fix(overlays): drop the backdrop blur from the overlay scrim - #126
Merged
Conversation
The `overlay-background` utility stacked `backdrop-blur-xs` under `bg-black/80`, so every Sheet, Dialog, AlertDialog, Drawer and LoadingOverlay painted a full-viewport backdrop-filter. That makes the scrim a backdrop root: Chromium has to re-blur everything beneath it whenever the panel's scroll container repaints, and a dropped frame in that pass presents the scrim before the blur lands — the page flashes through the open overlay while scrolling. Under an 80% black tint the blur contributes almost nothing, so removing it costs no visible fidelity and drops a per-frame full-viewport GPU pass. Toast keeps its `backdrop-blur-sm`; it is a small, non-scrolling surface and is not implicated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`.drawer-content` declared `@appy flex flex-col` — a typo for `@apply`. Tailwind ignores unknown at-rules silently, so the compiled `.drawer-content` carried no `display: flex` and the rule has never had any effect. No rendering changes at the default size: the content is `h-auto`, so `.drawer-footer`'s `mt-auto` has no free space to distribute and the `mx-auto w-[100px]` divider centres the same in block layout. It only becomes visible when a consumer passes an explicit height, where the footer now pins to the bottom as the stylesheet intends. Releases as 3.2.5 together with the overlay scrim fix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Two independent fixes, one commit each. Releases as
3.2.5.1. Overlay scrim repaint glitch (83bef90)
Reported in governance-studio: scrolling inside an open drawer or dialog intermittently flashes the page through the overlay. Reproduced on localhost, but it is not a dev-only artifact — the same CSS ships in production builds; dev just drops more frames, so it surfaces more often.
overlay-backgroundstackedbackdrop-blur-xsunderbg-black/80:That utility backs five components — Sheet, Dialog, AlertDialog, Drawer and LoadingOverlay — so each one painted a full-viewport
backdrop-filter. That makes the scrim a backdrop root: Chromium must re-blur everything beneath it whenever the panel's scroll container repaints, and a dropped frame in that pass presents the scrim before the blur lands. The wide-gamutcolor(display-p3 …)tint compounds it on macOS by forcing a colour-conversion path.Under an 80% black tint the blur contributes almost nothing, so dropping it costs no visible fidelity and removes a per-frame full-viewport GPU pass. Confirmed against studio: glitch gone, no perceptible visual change.
Toast keeps its
backdrop-blur-sm— small, non-scrolling surface, not implicated.2. Drawer flex column never applied (891680c)
.drawer-contentdeclared@appy flex flex-col— a typo for@apply. Tailwind ignores unknown at-rules silently, so the compiled.drawer-contenthas never carrieddisplay: flex.No rendering changes at the default size. The content is
h-auto, so.drawer-footer'smt-autohas no free space to distribute, and themx-auto w-[100px]divider centres identically in block layout. It only becomes visible when a consumer passes an explicit height, where the footer now pins to the bottom as the stylesheet intends.Drawerhas no consumers in guardian today and no demo page, so the blast radius is nil — worth fixing because the stylesheet currently misrepresents its own intent.Verification
packages/ui:backdrop-filterabsent from all five overlay stylesheets;.drawer-contentnow compilesdisplay: flex; flex-direction: column.format:checkpasses.pnpm lintreports 2 pre-existing errors inpackages/ui/dist/, unrelated to this change — eslint.config.mjs usesignores: ['dist'], which in flat config only matches a root-leveldist, so nestedpackages/*/distis linted whenever a local build exists. Needs'**/dist'; left for a separate PR.Follow-up worth considering
@appysurvived a full release because Tailwind fails silently on unknown at-rules. A stylelint rule rejecting them would catch this class of bug at build time.🤖 Generated with Claude Code