Skip to content

Commit b3e437b

Browse files
Lighten the mobile bar glass for older phones
The mobile menu's full-viewport blur(24) saturate(140%) reads beautifully on a Pixel but eats frames on older Snapdragons and 3-year-old iPhones. Drop to blur(10) with a touch more transparency so the panel still feels like glass without the GPU cost. The filter kernel scales with radius squared, so the saving is roughly 5x. Also drop saturate(), which adds another compositing pass. Take the sticky navbar and bottom CTA to blur(10) on mobile too for a consistent look. Desktop keeps the original premium glass.
1 parent 4a6d32e commit b3e437b

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

marketing/src/components/Navbar.astro

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,22 @@ const isActive = (path: string) => currentPath === path || currentPath === path.
8585

8686
/* Same root-cause as the navbar fix above: public-layout.css applies
8787
var(--bg-primary) to the mobile menu panel but the var falls through
88-
to transparent on the Astro pages, so the open menu lets page content
89-
bleed through and the links become illegible. Replace with an opaque
90-
cosmic-blue + backdrop blur, animate the entry/exit, stagger the
91-
items, and morph the burger into a close icon. */
88+
to transparent on the Astro pages, so the open menu let page text
89+
bleed into the links. Replace with a cosmic-blue tint and a lighter
90+
backdrop blur, animate the entry, stagger the items, and morph the
91+
burger into a close icon. */
9292
@media (max-width: 640px) {
93+
/* Lighter blur radius on mobile across all the glass bars. The
94+
cost of backdrop-filter scales roughly with the radius squared,
95+
so blur(10) is far cheaper than blur(24) on the full-viewport
96+
menu while the glass effect still reads clearly. The navbar and
97+
sticky CTA pick up the same value for a consistent look. */
98+
.pub-navbar,
99+
.pub-cta--sticky {
100+
backdrop-filter: blur(10px);
101+
-webkit-backdrop-filter: blur(10px);
102+
}
103+
93104
.pub-navbar .pub-navbar__nav {
94105
display: flex;
95106
visibility: hidden;
@@ -101,9 +112,9 @@ const isActive = (path: string) => currentPath === path || currentPath === path.
101112
transform 0.24s ease,
102113
visibility 0s linear 0.24s;
103114
padding: 2rem 1.5rem max(2rem, env(safe-area-inset-bottom));
104-
background: color-mix(in srgb, var(--bg-deep-space, #0C1133) 94%, transparent);
105-
backdrop-filter: blur(24px) saturate(140%);
106-
-webkit-backdrop-filter: blur(24px) saturate(140%);
115+
background: color-mix(in srgb, var(--bg-deep-space, #0C1133) 90%, transparent);
116+
backdrop-filter: blur(10px);
117+
-webkit-backdrop-filter: blur(10px);
107118
border-top: 1px solid color-mix(in srgb, var(--gold-primary, #E6BC5C) 16%, transparent);
108119
box-shadow: 0 16px 40px color-mix(in srgb, #000 45%, transparent);
109120
overflow-y: auto;

0 commit comments

Comments
 (0)