mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 10:32:57 +01:00
fix(v2): clean nav + backdrop in reduced-motion mode
Reduced-motion drops the 28px backdrop blur, which exposed two rough
edges the blur had been hiding:
- The fallback backdrop art (auth_background.svg) is authored to be seen
only through the blur; unblurred it shows a hard seam ("weird bar") and
a bright diagonal wedge. Drop the whole fixed art + overlay stack in
this mode and let the solid page background show through — cheaper on
weak GPUs and no seam.
- The top nav bar's only surface is a backdrop-filter glass. Against the
now-solid background that reads as murky, and the blur is expensive on
weak GPUs. Swap it for a flat opaque surface so the fixed bar stays a
clean solid strip as content scrolls under it.
Generated-By: PostHog Code
Task-Id: 6690877a-9c32-4c91-a78b-3d6fd3851fb7
This commit is contained in:
@@ -123,6 +123,17 @@ onBeforeUnmount(() => {
|
||||
border-bottom-color: var(--r-color-border);
|
||||
}
|
||||
|
||||
/* Reduced-motion / low-power: the glass is a backdrop-filter blur, which is
|
||||
expensive on weak GPUs and, against the now-solid page background (the
|
||||
backdrop art is dropped in this mode), just reads as murky. Swap it for a
|
||||
flat opaque surface so the fixed bar stays a clean, solid strip as content
|
||||
scrolls under it. */
|
||||
:global(html.r-v2-reduced-motion) .r-v2-nav-bar::before {
|
||||
background: var(--r-color-bg);
|
||||
backdrop-filter: none;
|
||||
-webkit-backdrop-filter: none;
|
||||
}
|
||||
|
||||
/* Grid `1fr auto 1fr` keeps the tab pill geometrically centred on the
|
||||
viewport regardless of the side clusters' widths. With flex +
|
||||
justify-content:center the pill drifts whenever logo and right
|
||||
|
||||
@@ -185,15 +185,15 @@ html[data-input="pad"] .r-v2 * {
|
||||
}
|
||||
|
||||
/* Reduced-motion mode (Settings, per device; defaults to the OS
|
||||
`prefers-reduced-motion`): a full-viewport blur(28px) is one of the heaviest
|
||||
things we ask of the GPU and pegs weak rendering backends (see the Firefox
|
||||
note above). Keep the same tone shift but drop the blur so low-power devices
|
||||
only composite a sharp, dimmed backdrop. */
|
||||
html.r-v2-reduced-motion .r-v2-bg__layer {
|
||||
filter: brightness(0.45);
|
||||
}
|
||||
html.r-v2-reduced-motion.r-v2-light .r-v2-bg__layer {
|
||||
filter: brightness(1.12) saturate(0.7);
|
||||
`prefers-reduced-motion`): the backdrop art is authored to be read only
|
||||
through the 28px blur — unblurred it shows hard seams and a bright diagonal
|
||||
wedge. And a full-viewport blur(28px) is one of the heaviest things we ask
|
||||
of the GPU (see the Firefox note above). So drop the whole fixed art +
|
||||
overlay stack and let the solid page background (`.r-v2` bg) show through:
|
||||
cheaper, and no weird seam. */
|
||||
html.r-v2-reduced-motion .r-v2-bg,
|
||||
html.r-v2-reduced-motion .r-v2-bg__overlay {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* The OS `prefers-reduced-motion` query is honored per-component (each R*
|
||||
|
||||
Reference in New Issue
Block a user