Skip to content

fix: keep performance animations under reduced-motion setting - #1072

Open
fltLi wants to merge 4 commits into
OpenWebGAL:devfrom
fltLi:fix/ignore-system-reduced-motion
Open

fltLi wants to merge 4 commits into
OpenWebGAL:devfrom
fltLi:fix/ignore-system-reduced-motion

Conversation

@fltLi

@fltLi fltLi commented Nov 22, 2026

Copy link
Copy Markdown

概述

在操作系统开启“减少动态效果”时,WebGAL 一些演出动画会失效(如 intro: -animation)。
演出动画作为叙事内容,不应被关闭。

此 PR 为舞台元素保留了动画效果,同时其外的 UI 仍受系统控制以尊重用户偏好。

实现

Stage 根节点添加 data-webgal-stage 标记,界定演出子树。
新增 Vite 插件,构建期将 modern-css-reset 的 reduced-motion 压制选择器限定到舞台之外。

MakinoharaShoko and others added 4 commits September 24, 2026 21:40
modern-css-reset suppresses all animations under prefers-reduced-motion via
a global * + !important rule, which disables intro and other stage animations.
Stage animations are narrative content and should not be turned off by the
OS setting, while UI outside the stage should still respect the user's
preference.

Mark the stage root with data-webgal-stage and add a Vite plugin that rewrites
modern-css-reset at build time, scoping its motion suppression to elements
outside the stage subtree. The dependency remains tracked by the package
manager; the plugin warns if the upstream rule text no longer matches.

This branch has not been deployed

No deployments
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.

2 participants