mirror of
https://github.com/hiaaryan/sileo.git
synced 2026-04-26 23:45:50 +03:00
[PR #23] [MERGED] fix: scope prefers-reduced-motion CSS to Sileo viewport only #25
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sileo#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hiaaryan/sileo/pull/23
Author: @lubauss
Created: 2/21/2026
Status: ✅ Merged
Merged: 2/21/2026
Merged by: @hiaaryan
Base:
main← Head:fix/scoped-reduced-motion📝 Commits (1)
cc182e3fix: scope prefers-reduced-motion CSS to Sileo viewport only📊 Changes
1 file changed (+4 additions, -3 deletions)
View changed files
📝
src/styles.css(+4 -3)📄 Description
Summary
The
@media (prefers-reduced-motion: reduce)block instyles.cssuses an unscoped*selector that disables all CSS animations and transitions across the entire page — not just Sileo toasts.Problem
When a user has
prefers-reduced-motion: reduceenabled, importing Sileo's stylesheet causes every animation in the host app to break:Any app using page transitions, animated modals, loading spinners, or third-party component libraries will have their animations killed.
Solution
Scope the reduced-motion overrides to Sileo's own DOM tree using the
[data-sileo-viewport]attribute selector:Files Changed
src/styles.css(lines 458-466)*selector to[data-sileo-viewport]descendantsTesting
animate-spin)prefers-reduced-motion: reducein OS accessibility settingsBackward Compatibility
Fixes #19
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.