Skip to content

fix(pwa): opaque edge bars in the installed app so iOS 26 stops blurring over content - #994

Merged
mbryantms merged 1 commit into
mainfrom
fix/ios-edge-blur
Oct 4, 2026
Merged

mbryantms merged 1 commit into
mainfrom
fix/ios-edge-blur

Conversation

@mbryantms

Copy link
Copy Markdown
Owner

Problem

On iOS / iPadOS 26, the installed app shows a fade at the top that runs over the header and into the content.

This is the system's Liquid Glass scroll edge effect: a blur that fades about 40pt down from the top of the web view. No CSS property or meta tag turns it off. WebKit skips it only when a fixed or sticky full-width box at the edge paints one solid colour, which it then extends into the system area (FixedContainerEdges / PageColorSampler).

Folio's top bars are bg-background/80 + backdrop-blur. Content shows through them, so WebKit samples many colours and draws the blur. The reader also added its own from-black/80 to-transparent fade under the status bar.

Change

  • New standalone: Tailwind variant (@media (display-mode: standalone)). In the installed app these bars become opaque with no backdrop blur. Browser tabs keep the frosted look.
    • library header (MainShell)
    • admin header (AdminShell)
    • reader chrome (ReaderChrome)
    • reader loading skeleton
    • mobile bottom tab bar (same effect, bottom edge)
  • Reader status-bar scrim is now solid black instead of a gradient. It has zero height wherever SafeAreaProbe pins --safe-top to 0 (iOS 26.1+).
  • Guard test: tests/pwa/edge-effect.test.ts requires every edge-docked frosted bar in those files to carry standalone:bg-* and standalone:backdrop-blur-none.
  • Verified that Tailwind 4.3.3 emits the four standalone\: rules inside @media (display-mode: standalone).

Needs a device check

I can't render iOS here. After deploy, check on iPhone and iPad:

  1. Library and admin: the top of the header and the first row should be sharp, with no fade.
  2. Reader with chrome shown: no fade over the top bar.
  3. Reader with chrome hidden: the top edge is then the comic page itself, which is multi-coloured, so iOS may still blur the top ~40pt of the art. If it does, the follow-up is a thin opaque black band at the top in standalone mode, with the page laid out below it so nothing is covered.

If the home-screen icon was added before #777, remove and re-add it: iOS keeps the status-bar style it saw at install time.

References

…ing over content

iOS / iPadOS 26 home-screen web apps get the Liquid Glass "scroll edge
effect": a blur fading ~40pt down from the top of the web view, over the
content. WebKit skips it only when a fixed / sticky full-width box at the
edge paints one solid colour (FixedContainerEdges), which it then
extends. Folio's top bars are translucent + backdrop-blur (sampled as
"multiple colours"), and the reader added its own black-to-transparent
fade under the status bar, so the system blur sat on top of the header
and the first rows of content.

- New `standalone:` Tailwind variant (`@media (display-mode:
  standalone)`). The library and admin headers, the reader chrome, its
  loading skeleton and the mobile bottom tab bar go opaque with no
  backdrop blur in the installed app; browser tabs keep the frosted look.
- The reader's status-bar scrim is solid black instead of a gradient
  (zero height wherever SafeAreaProbe pins --safe-top to 0).
- tests/pwa/edge-effect.test.ts guards it: every edge-docked frosted bar
  in those files must carry standalone:bg-* + standalone:backdrop-blur-none.
@mbryantms
mbryantms merged commit a3f736f into main Oct 4, 2026
15 checks passed
@mbryantms
mbryantms deleted the fix/ios-edge-blur branch October 4, 2026 12:30
mbryantms added a commit that referenced this pull request Oct 4, 2026
…talled app (#995)

With the reader chrome hidden on iPadOS 26.1+, the system scroll-edge
blur still ran the artwork up into the status bar. #994 made the
status-bar backing solid, but its height is `--safe-top`, which
SafeAreaProbe pins to 0 on those versions. WebKit only treats a fixed
edge bar as a solid colour to extend when it is more than 10px tall
(LocalFrameView::fixedContainerEdges, thinBorderWidth), and nothing
else at the top edge qualifies (the tap overlay is transparent), so it
blurred instead.

- New `--reader-top` token: `--safe-top` in a browser tab,
  `max(--safe-top, 12px)` under `display-mode: standalone`.
- The reader's status-bar backing and the fitted/double/webtoon page
  padding + fit calcs use it, so the bar never covers fitted art.
- edge-effect test guards the 12px floor and the padding switch.
mbryantms added a commit that referenced this pull request Oct 4, 2026
…the installed app (#999)

After #994 and #995 the installed app on iPadOS still showed a fade over
the top ~40pt of the web view: the library header icons and the reader
chrome (back arrow, page counter) rendered dimmed. That fade is the
system's Liquid Glass scroll-edge ramp, drawn ABOVE the web view below
the status bar. Opaque edge bars and the opaque `black` status-bar style
don't remove it (both already in place); no CSS or meta tag turns it
off. Projects that verified on devices (e.g. mval23/remy#12 on iPad,
xdoubleu/tools.xdoubleu.com#1987) found one fix: keep content out of it.

- globals.css: `--edge-ramp` (2rem in the installed iOS/iPadOS app via
  `@supports (-webkit-touch-callout: none)` + `display-mode: standalone`
  or `[data-standalone]`; 0 on landscape phones and everywhere else) and
  `--top-inset = --safe-top + --edge-ramp`. `--topbar-h` and the
  reader's `--reader-top` include it.
- Top bars and top-anchored surfaces pad by `--top-inset`: library and
  admin headers + nav sheets, reader chrome + loading skeleton, peek
  banner, skip links, pull-to-refresh, StatusScreen, cover viewer,
  filter sheet and the sheet close button. The added band is painted in
  each bar's own solid colour, so the ramp over it is invisible and the
  controls sit below it. Reader pages start below the black status-bar
  backing, which now spans the ramp too.
- SafeAreaProbe marks `<html data-standalone>` from navigator.standalone
  as a fallback for launches where the display-mode query doesn't match.
- edge-effect test pins the clearance and that edge bars never pad by
  the raw `--safe-top`.

Browser tabs, desktop and Android are unchanged (`--edge-ramp` is 0).
mbryantms added a commit that referenced this pull request Oct 4, 2026
…1004)

A throwaway diagnostic surface, unlinked from the app and marked
noindex. Five variants, each isolating one hypothesis about what the
system draws into the installed app's status-bar strip (#994, #995, #999
and its revert #1003 all tried in-page fixes; the fade lives above the
page, showing blurred page content):

A  page scroll, colour to the top (baseline)
B  page scroll + fixed 56px solid-black bar
C  document never scrolls; full-screen inner scroller
D  inner scroller below a static 56px black block
E  page scroll, tall static black block first (at rest vs scrolled)

Each variant pre-scrolls 400px (except E), uses saturated labelled rows
so any blur is obvious, and docks a geometry readout at the BOTTOM
(standalone detection, inner vs screen size, visualViewport,
env(safe-area-inset-top), --safe-top, scrollY) so screenshots carry the
measurements. Inner-scroller variants lock document scroll and restore
it on leave.

Delete `app/[locale]/pwa-lab` + `lib/pwa-lab.ts` once the fade is
understood.
zunhdev added a commit to zunhdev/tonaris that referenced this pull request Oct 31, 2026
…ring it (TON-135) (#135)

Closes TON-135

Found in the creator's manual testing (31 October 2026): on an iPhone,
the top bar ("Collection" and its buttons) looked shaded and blurred, as
under a gradient. Android was fine.

**Cause:** nothing in Tonaris draws a gradient or blur there. iOS 26
Home Screen apps get Liquid Glass's *edge effect*, a blur over the
status bar and about 40 pt below it. Reports from several apps that hit
the same thing ([1](devswha/ovis#106),
[2](mbryantms/folio#994)) describe WebKit
skipping it when a **fixed or sticky** box, nearly full width, more than
~10 px tall and painted in **one solid colour**, covers the top edge.
WebKit then uses that colour for the status bar. Our phone top bar was a
static flex child with no background of its own, so it didn't qualify.

**Fix:** the phone's top bar is `sticky top-0` with `bg-app`, the
background it already appeared to have, so the layout doesn't change.
The first phone test now checks that the bar is sticky and opaque.

**Not verifiable here:** Playwright's WebKit doesn't draw iOS's edge
effect, and several of those reports were unverified on devices.
**Please check on your iPhone** after the deploy (installed app and
Safari). If the haze remains, the next step is a fixed solid strip at
the very top edge.

**Verification:** full `bun run check` passed locally (1450 tests, 164
browser tests).

**Docs:** DS-110 (fixed in TON-135).

**OpenSpec change:** none (Bug).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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