diff options
| author | Fuwn <[email protected]> | 2026-05-19 02:48:04 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-05-19 02:48:04 +0000 |
| commit | 41ccb3af55d189b5aedd4ee497e49ceda4f1fc8e (patch) | |
| tree | cb7716d72bb370a1106c250debe8b1ad0272ce80 /src/lib/Media/Cover/hoverCover.ts | |
| parent | fix(nav): respect displayDisableAnimations in view transitions (diff) | |
| download | due.moe-41ccb3af55d189b5aedd4ee497e49ceda4f1fc8e.tar.xz due.moe-41ccb3af55d189b5aedd4ee497e49ceda4f1fc8e.zip | |
The setting previously only gated the fly slide in Root.svelte.
Renaming the label to "Reduce motion" sets the expectation that it
acts as a force-on for the browser's prefers-reduced-motion: reduce
across the board, so the setting's scope is broadened to match.
Storage key (displayDisableAnimations) stays the same so existing
user preferences carry over. Only the i18n label and behavior scope
change.
Adds a reducesMotion() helper that combines the media query with
the setting. View Transitions, Lenis init, and the details JS
animation now all bypass via this helper. A reactive $: toggles
html.reduce-motion on the root element based on the setting; the
normalise.css bandaid that already collapsed animations under
prefers-reduced-motion is duplicated under that class so every CSS
animation and transition (Svelte fly, dropdown panels, hamburger
morph, header scroll-hide, the global :where transitions) snaps to
0.01ms when the setting is on.
Diffstat (limited to 'src/lib/Media/Cover/hoverCover.ts')
0 files changed, 0 insertions, 0 deletions