Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
在操作系统开启“减少动态效果”时,WebGAL 一些演出动画会失效(如
intro: -animation)。演出动画作为叙事内容,不应被关闭。
此 PR 为舞台元素保留了动画效果,同时其外的 UI 仍受系统控制以尊重用户偏好。
实现
Stage 根节点添加
data-webgal-stage标记,界定演出子树。新增 Vite 插件,构建期将
modern-css-reset的 reduced-motion 压制选择器限定到舞台之外。