Skip to content

fix(overlays): drop the backdrop blur from the overlay scrim - #126

Merged
tmccoy14 merged 2 commits into
mainfrom
fix/overlay-scrim-repaint
Sep 1, 2026
Merged

fix(overlays): drop the backdrop blur from the overlay scrim#126
tmccoy14 merged 2 commits into
mainfrom
fix/overlay-scrim-repaint

Conversation

@tmccoy14

@tmccoy14 tmccoy14 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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-background stacked backdrop-blur-xs under bg-black/80:

@utility overlay-background {
  @apply backdrop-blur-xs bg-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-gamut color(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-content declared @appy flex flex-col — a typo for @apply. Tailwind ignores unknown at-rules silently, so the compiled .drawer-content has never carried display: flex.

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 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. Drawer has 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

  • Rebuilt packages/ui: backdrop-filter absent from all five overlay stylesheets; .drawer-content now compiles display: flex; flex-direction: column.
  • format:check passes.
  • pnpm lint reports 2 pre-existing errors in packages/ui/dist/, unrelated to this change — eslint.config.mjs uses ignores: ['dist'], which in flat config only matches a root-level dist, so nested packages/*/dist is linted whenever a local build exists. Needs '**/dist'; left for a separate PR.

Follow-up worth considering

@appy survived 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

tmccoy14 and others added 2 commits September 1, 2026 08:49
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>
@tmccoy14
tmccoy14 merged commit fdf509e into main Sep 1, 2026
1 check passed
@tmccoy14
tmccoy14 deleted the fix/overlay-scrim-repaint branch September 1, 2026 12:54
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