pavel 1ar.ionov

Safari 26 and 27 Liquid Glass toolbar fixes

Fix Safari Liquid Glass toolbar tinting, white bars, the iOS 27 top blur, stuck overlay tints and fullscreen media. Tested on iOS 26 and iOS 27.2.

Updated 11 min read

Safari has ignored theme-color since iOS 26. It reads your CSS instead, and iOS 27 changed some of the rules again.

Updated 4 December 2026: retested on iOS 27.2.1. The absolute-child header trick no longer stops tinting. Overlays tint differently. The scroll runway for fullscreen media now shows the fallback color. iOS 27 also adds a blur behind the status bar.

Short answer

This works on Safari 26 and 27:

  1. Set background-color on html and body. Safari uses it for the status bar when nothing else qualifies. A transparent root falls back to white.
  2. Expect the edges to be sampled. Safari colors the status bar and the bottom toolbar from fixed or sticky elements that touch the screen edge and span most of its width. On iOS 27 that includes their absolutely positioned children.
  3. Float the header if it shouldn’t tint the chrome. Leave a gap of about 12px from the top edge, or keep it narrower than about 70% of the screen.
  4. Use an opaque full-width bar at the top edge if you want a solid status bar. It also removes the iOS 27 blur.
  5. Close overlays with display: none. On iOS 27 an overlay that fades out to opacity: 0 keeps its tint.
  6. Keep viewport-fit=cover. iOS 26 needs it for the bottom toolbar, and it’s harmless on 27.
  7. Test on a real iPhone. The simulator misses half of this.

What changed in Safari 27

CaseSafari 26Safari 27.2
theme-colorIgnoredIgnored
Root background-colorColors the status barColors the status bar
Transparent rootWhite barWhite bar
Colored fixed or sticky element at the edgeTints the barTints the bar
Color on an absolute child of a fixed elementIgnoredTints the bar
Floating header inset from the edgeNot testedIgnored
Overlay at opacity: 0 from the startTints the barIgnored
Overlay faded to opacity: 0 after showingTints the barKeeps the old tint
Overlay with display: noneIgnoredIgnored
viewport-fit=cover for the bottom toolbarRequiredNot needed
Page scrolled under the status barVisibleVisible under a blur
Fullscreen media with a scroll runwayShows real pixelsShows the fallback color
Safari 27: iPhone 15 Pro, iOS 27.2.1, Bottom tab layout, 4 December 2026. Safari 26: my earlier tests in February and May 2026. Compact layout and iPad were not retested.

The fix for coding agents

Paste this into Codex, Claude Code, Cursor, or any other coding agent when Safari’s Liquid Glass toolbars look wrong:

You are fixing iOS 26/27 Safari Liquid Glass toolbar bugs.

Symptoms:
- white, black, or odd tinted area behind the bottom Safari toolbar
- unwanted color behind the top status bar
- a fixed or sticky header tints Safari chrome
- the toolbar keeps a modal's color after the modal closed
- iOS 27: blurred strip behind the status bar when the page scrolls
- viewport-fit=cover or 100dvh alone did not fix it

Rules:
1. Keep viewport-fit=cover:
   <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />

2. Set an explicit background-color on html and body. Never transparent.
   Safari ignores theme-color for toolbar tinting.

3. Safari samples fixed and sticky elements that touch a screen edge and span most of the width.
   On iOS 27 this includes their position:absolute children.

4. A header that must not tint the chrome: float it.
   top: 12px or more, or narrower than about 70% of the viewport.

5. A solid status bar color, and no iOS 27 top blur: an opaque, full-width fixed bar at top: 0.

6. Closed overlays, backdrops, and panels: display: none.
   On iOS 27 an overlay faded out with opacity: 0 keeps its toolbar tint.

7. Fullscreen image or video pages: a position:fixed; inset:0 media layer.
   Set the root background-color to the media's top edge color as a fallback.
   Do not add a scroll runway on iOS 27.

8. Avoid body { overflow: hidden }. Lock scrolling inside the app shell instead.

9. Test on a real iPhone on iOS 27, in Safari and as a Home Screen web app if the site supports it.

The rest of this article explains each rule with screenshots from a real iPhone.

With Liquid Glass, Apple made every toolbar and status bar translucent. Safari now takes its chrome color from the web page. If your fixed header has a background color, the status bar matches it. If an overlay sits at the bottom of the viewport, the bottom toolbar turns its color.

Apple doesn’t document the rules. Everything here comes from trial and error while building 1ar.io.

How Safari picks the toolbar color

Safari looks at what is painted at the top and bottom edges of the viewport:

  • Fixed or sticky elements that touch the edge and span most of its width. Their background color becomes the tint, and translucent colors blend with the page.
  • The html and body background, when no element qualifies. A transparent root falls back to white in light mode and black in dark mode.

Safari ignores:

  • theme-color. It stopped working in iOS 26 and is still ignored in 27.
  • Elements inset from the edge. In my iOS 27 tests, a pink pill 12px below the status bar didn’t tint it, and neither did a bar touching the edge at 70% width.
  • A backdrop-filter without a background color. It added no tint in my iOS 27 test.
  • Ordinary page content at scroll position 0.

Community measurements of the thresholds don’t agree. The andesco test suite found 4px from the top, 3px from the bottom and 80% of the width. A reading of the WebKit source gives 10px and 90%. Leave a clear margin in both directions and you don’t need the exact numbers.

iOS 27 samples absolute children

On iOS 26, moving a header’s background onto a position: absolute child stopped the tint. Safari only checked the fixed element itself. On iOS 27 the child tints the bar just like the parent.

Two iOS 27 Safari screenshots side by side. Left: a fixed pink header and a fixed green footer tint the status bar pink and the toolbar green. Right: the same header and footer with the colors moved to absolute children give the same pink and green tint.
iOS 27: color on the fixed element (left) and on its absolute child (right) tint the chrome the same way.

Fixing the top bar

Decide first whether you want the status bar to take your header’s color.

You want the header’s color. Make it an opaque, full-width fixed bar at top: 0. Safari extends that color behind the status bar. On iOS 27 it also removes the new top blur.

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
}

You want the page color. Float the header. On iOS 27 this replaces the absolute-child trick.

.site-header {
  position: fixed;
  top: 12px;
  left: 16px;
  right: 16px;
  border-radius: 999px;
  background-color: rgb(255 255 255 / 0.8);
  backdrop-filter: blur(12px);
}

The status bar then uses the root background-color, so set it to the color you want there.

For iOS 26 only, the old fix still works: keep the fixed header transparent and put the background and backdrop-filter on an absolutely positioned child.

The iOS 27 top blur

iOS 27 added a blur behind the status bar. Apple’s release notes don’t mention it.

In a Safari tab, it appears once the page scrolls and no qualifying element sits at the top edge. The blur is about as tall as the status bar. An opaque full-width fixed bar at top: 0 removes it. A floating or translucent header doesn’t.

Two iOS 27 Safari screenshots of a scrolled page. Left: text lines are blurred and darkened behind the status bar. Right: a solid white fixed bar at the top edge gives a clean white status bar with no blur.
iOS 27 in a Safari tab: the scrolled page blurs behind the status bar (left). An opaque fixed bar at the top edge removes the blur (right).

In Home Screen web apps the blur is larger. I haven’t retested these myself, so this part comes from other people’s tests:

  • With apple-mobile-web-app-status-bar-style set to black-translucent, the blur reaches about 112px down (ovis issue #164).
  • Reinstalling the app with the default status bar style removes it. iOS reads that meta tag only when the app is added to the Home Screen, so existing installs keep the blur.
  • Danny Moerkerke found that a solid fixed element at least 6px tall, 80% wide and within 4px of the top removes it. He found no way to get a transparent status bar without the blur.
  • No CSS property, meta tag or manifest key turns it off. It was still there after 27.2.

Fixing the bottom bar

On iOS 27 the page shows through the bottom toolbar with or without viewport-fit=cover. On iOS 26, without it, the page stops at the safe area and Safari draws a solid bar below. Keep it for iOS 26 and for env(safe-area-inset-*):

<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />

A colored fixed footer at the bottom edge tints the toolbar on both versions. When nothing qualifies, Safari falls back to the root background, so set it explicitly:

html,
body {
  background-color: var(--page-bg);
}

Leaving html or body transparent doesn’t give you more Liquid Glass. It gives you a white bar.

Hidden overlays

Modal backdrops, menus and dropdowns usually stay in the DOM with opacity: 0 and pointer-events: none until opened. A full-viewport backdrop touches both edges, so Safari checks it for both bars.

  • iOS 26: a backdrop at opacity: 0 still tints the toolbar.
  • iOS 27: a backdrop that starts at opacity: 0 is ignored. Once it has been visible, fading it out leaves the tint behind. The WebKit source keeps a sampled edge color until the element loses its renderer.
Two iOS 27 Safari screenshots taken after an orange full-screen backdrop was shown and then hidden. Left: hidden with opacity 0, the status bar and toolbar stay orange. Right: hidden with display none, both return to the page's gray.
iOS 27: a backdrop closed with opacity: 0 keeps its orange tint (left). Closed with display: none, the chrome returns to the page color (right).

display: none removes the element from rendering, which fixes both versions:

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.4);
  opacity: 0;
  transition: opacity 0.2s;
}

.modal-backdrop.is-open {
  opacity: 1;
}

For a fade, show the element first and set display: none again after the transition:

function openModal() {
  backdrop.style.display = 'block';
  requestAnimationFrame(() => backdrop.classList.add('is-open'));
}

function closeModal() {
  backdrop.classList.remove('is-open');
  setTimeout(() => {
    backdrop.style.display = 'none';
  }, 200); // match the CSS transition
}

While the modal is open, the toolbar takes its color, which is what you want.

Fullscreen image and video pages

Game menus, launch pages, film pages and fullscreen video all fill the viewport with one moving visual.

On iOS 27, put the media in a fixed layer. Safari extends the media’s edge color under the status bar and the toolbar:

html,
body {
  margin: 0;
  background-color: #e8346c; /* the media's top edge color */
}

.media-stage {
  position: fixed;
  inset: 0;
}

.media-stage > img,
.media-stage > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

On iOS 26, this setup showed the root color behind the status bar at scroll position 0. My fix then was a scroll runway: make the document slightly taller, push the app down by a small offset, and scroll to that offset on load. On iOS 27 the same runway shows the root fallback color at both edges.

Two iOS 27 Safari screenshots of a fullscreen gradient page with a magenta root background. Left: a fixed gradient layer, with the status bar and toolbar in the gradient's edge colors. Right: the same gradient with a scroll runway, with magenta bars at the top and bottom.
iOS 27: a fixed media layer (left) against the iOS 26 scroll runway (right). The runway now exposes the magenta fallback color.

To cover both versions, use the fixed layer and set the root color to the media’s top edge color. iOS 26 then shows a close match at scroll position 0, and iOS 27 shows the real edge color.

Avoid body { overflow: hidden } on either version. Put height: 100dvh and overflow: hidden on the app shell, and block gestures inside the shell, carousel or menu.

The keyboard accessory bar gap

I found this on iOS 26 and haven’t retested it on 27.

When the software keyboard is open, iOS shows a native accessory bar between the page and the keyboard. This bar renders a slice of the page outside your overlay’s compositing layer. A command palette or search overlay with backdrop-filter blurs everything except that strip, so sharp page text shows between the input and the keyboard.

No CSS on the overlay reaches it. Blur the content itself instead:

function openOverlay() {
  for (const el of document.querySelectorAll('.layout-main, footer')) {
    el.style.filter = 'blur(8px)';
  }
}

function closeOverlay() {
  for (const el of document.querySelectorAll('.layout-main, footer')) {
    el.style.filter = '';
  }
}

The accessory bar copies the rendered content, so it gets the blurred version.

These didn’t work:

  • A dark body background. The gap shows rendered elements, not the body background.
  • filter: brightness(). Blur carries into the accessory bar and brightness doesn’t.
  • opacity with filter: blur(). Opacity cancels the blur effect.
  • Dark backgrounds on content elements. They darken the content behind the overlay too much and leave the gap unchanged.

Checklist

  1. Viewport: keep viewport-fit=cover.
  2. Root color: set background-color on html and body, never transparent.
  3. Header that shouldn’t tint: float it 12px from the edge or keep it under about 70% width. On iOS 26 only, an absolute child also works.
  4. Solid status bar and no iOS 27 blur: an opaque full-width fixed bar at top: 0.
  5. Overlays: display: none when closed.
  6. theme-color: set it for other browsers. Safari ignores it.
  7. Safe areas: pad content with env(safe-area-inset-*).
  8. Fullscreen media: a fixed inset: 0 layer, with the root color matched to the media’s top edge. No scroll runway on iOS 27.
  9. Scroll lock: on the app shell, not on body.
  10. Keyboard overlays: blur the content, not just the overlay.
  11. Testing: a real iPhone, in Safari and as a Home Screen web app if you support one.

Known issues

  • Fixed-element tinting was filed as WebKit bug 302272 and closed as working as designed.
  • A WebKit change in July 2026 painted a system background strip in the top inset. It was removed again in October (WebKit bug 327043). I couldn’t confirm which public release carries the removal.
  • None of the Safari 27.0, 27.1 or 27.2 release notes mention toolbar tinting or the top blur.

Liquid Glass looks great in native apps, where Apple controls every layer. On the web it’s a set of undocumented sampling rules that changed between two major releases without a word. Test on a device after every iOS update.

Further reading