Sticky solid top bar so iPadOS doesn't blur it in the home-screen app

iOS/iPadOS 26 draws a blur over the top of home-screen web apps; with a
solid, full-width bar stuck to the top edge WebKit extends its color
instead. The status banners now sit just below the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-14 07:01:12 -05:00
1 parent cce1ce51b5
commit 9d3643df33
2 files changed
+9 -7

No files matched your search

+7 -6
View File
@@ -25,12 +25,8 @@
<body class="min-h-full text-slate-800" data-controller="offline-sync page-age app-update<%= " offline-prep" if current_user %>"<% if current_user %> data-offline-prep-aircraft-value="<%= offline_pages.to_json %>"<% end %>> <body class="min-h-full text-slate-800" data-controller="offline-sync page-age app-update<%= " offline-prep" if current_user %>"<% if current_user %> data-offline-prep-aircraft-value="<%= offline_pages.to_json %>"<% end %>>
<%= t(".skip_to_content_html") %> <%= t(".skip_to_content_html") %>
<div class="hidden bg-sky-50 px-4 py-2 text-center text-sm text-sky-900 ring-1 ring-sky-200" data-page-age-target="banner" role="status"></div> <%# Solid and stuck to the top: iOS 26 home-screen apps then extend its color under the status bar instead of blurring it. %>
<div class="hidden bg-sky-50 px-4 py-2 text-center text-sm text-sky-900 ring-1 ring-sky-200" data-app-update-target="banner" role="status"> <header class="sticky top-0 z-40 bg-header text-white">
<%= t(".updated") %> <button type="button" class="btn-secondary btn-sm ml-1" data-action="app-update#reload"><%= t(".reload") %></button>
</div>
<div class="hidden space-y-1 bg-amber-50 px-4 py-2 text-center text-sm text-amber-900 ring-1 ring-amber-200" data-offline-sync-target="banner" role="status"></div>
<header class="bg-header text-white">
<div class="mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-3"> <div class="mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-3">
<%= link_to root_path, class: "flex items-center gap-2 font-semibold tracking-tight whitespace-nowrap" do %> <%= link_to root_path, class: "flex items-center gap-2 font-semibold tracking-tight whitespace-nowrap" do %>
<span class="text-xl">✈</span> <span class="hidden sm:inline"><%= t(".simple_aircraft_manager") %></span><span class="sm:hidden" aria-label="<%= t(".simple_aircraft_manager") %>"><%= t(".sam") %></span> <span class="text-xl">✈</span> <span class="hidden sm:inline"><%= t(".simple_aircraft_manager") %></span><span class="sm:hidden" aria-label="<%= t(".simple_aircraft_manager") %>"><%= t(".sam") %></span>
@@ -84,6 +80,11 @@
<% end %> <% end %>
</div> </div>
</header> </header>
<div class="hidden bg-sky-50 px-4 py-2 text-center text-sm text-sky-900 ring-1 ring-sky-200" data-page-age-target="banner" role="status"></div>
<div class="hidden bg-sky-50 px-4 py-2 text-center text-sm text-sky-900 ring-1 ring-sky-200" data-app-update-target="banner" role="status">
<%= t(".updated") %> <button type="button" class="btn-secondary btn-sm ml-1" data-action="app-update#reload"><%= t(".reload") %></button>
</div>
<div class="hidden space-y-1 bg-amber-50 px-4 py-2 text-center text-sm text-amber-900 ring-1 ring-amber-200" data-offline-sync-target="banner" role="status"></div>
<main id="main" tabindex="-1" class="mx-auto max-w-7xl px-4 py-6 focus:outline-none"> <main id="main" tabindex="-1" class="mx-auto max-w-7xl px-4 py-6 focus:outline-none">
<%= render "shared/flash" %> <%= render "shared/flash" %>
+2 -1
View File
@@ -20,7 +20,8 @@
</head> </head>
<body class="min-h-full text-slate-800"> <body class="min-h-full text-slate-800">
<%= t(".skip_to_content_html") %> <%= t(".skip_to_content_html") %>
<header class="bg-header text-white"> <%# Solid and stuck to the top: iOS 26 home-screen apps then extend its color under the status bar instead of blurring it. %>
<header class="sticky top-0 z-40 bg-header text-white">
<div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-3"><span class="font-semibold"><span class="text-xl">✈</span> <%= t(".simple_aircraft_manager") %></span><%= render "shared/theme_toggle" %></div> <div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-3"><span class="font-semibold"><span class="text-xl">✈</span> <%= t(".simple_aircraft_manager") %></span><%= render "shared/theme_toggle" %></div>
</header> </header>
<main id="main" tabindex="-1" class="mx-auto max-w-7xl px-4 py-6 focus:outline-none"> <main id="main" tabindex="-1" class="mx-auto max-w-7xl px-4 py-6 focus:outline-none">