Skip to content

Fix Chrome/Blink rendering bug in dark mode in specific MacOS hardware profiles#82

Merged
lauslim12 merged 1 commit intomainfrom
chromium-rendering-bug-fix
Mar 7, 2026
Merged

Fix Chrome/Blink rendering bug in dark mode in specific MacOS hardware profiles#82
lauslim12 merged 1 commit intomainfrom
chromium-rendering-bug-fix

Conversation

@lauslim12
Copy link
Copy Markdown
Owner

Description

Essentially, resolves black horizontal banding artifact in specific MacOS profiles with Chrome.

Users on specific hardware profiles (specifically macOS with discrete/integrated GPU switching, like the i9 MacBook Pro) were experiencing a rendering artifact in Chrome. A solid black horizontal band would appear across the middle of the screen, occupying the empty space between the <main> content and the <footer>.

This issue did not occur in Firefox or Safari.

Root Cause

This is caused by a hardware acceleration and compositing glitch in Chrome's rendering engine (Blink).

  • Our layout uses a min-h-screen flex container with a flex-1 main content area to push the footer to the bottom.
  • From the GPU's perspective, the empty space stretched by flex-1 contains no DOM nodes.
  • To save GPU memory, Chrome attempts to optimize this by skipping the paint step for the tiles in that transparent mathematical void.
  • On certain macOS GPU profiles, the handoff fails, and the browser fails to let the <body> background shine through.

Instead, it leaves an uninitialized GPU tile, which renders in Skia/ANGLE as pure black.

The Fix

Applied a "double paint" technique. By moving/adding the explicit background color classes (bg-gray-50 dark:bg-slate-950) directly to the root flex wrapper in App.tsx, we stop relying on the <div id="root">'s background to show through a transparent container. This forces Chrome's compositor to explicitly paint the color data into those stretched flex tiles, overriding the buggy optimization step.

@lauslim12 lauslim12 merged commit 656c046 into main Mar 7, 2026
2 checks passed
@lauslim12 lauslim12 deleted the chromium-rendering-bug-fix branch March 7, 2026 15:40
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