Fix iOS Safari's ugly browser chrome with two fixed CSS strips

msg · x · 2026-10-15

Josh Puckett shares a practical fix for iOS Safari's browser chrome ruining immersive web designs.

Problem: the theme-color meta tag doesn't work reliably in-browser and can't set separate top/bottom colors.

Fix: Safari extends a fixed element's background behind its controls — add thin position: fixed strips at the top and bottom edges using max(12px, env(safe-area-inset-top)) heights, colored to match the document background, for a seamless look that supports dynamic gradients on scroll.

Original post →

More from coding & agent

coding & agent channel →