File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed
Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " sub-store-front-end" ,
3- "version" : " 2.15.84 " ,
3+ "version" : " 2.15.85 " ,
44 "private" : true ,
55 "scripts" : {
66 "dev" : " vite --host" ,
Original file line number Diff line number Diff line change 1+ /* *
2+ * 修复 modern-css-reset 在 prefers-reduced-motion 时的问题
3+ *
4+ * 问题:modern-css-reset 将动画/过渡时间设置为 0.01ms,这会导致:
5+ * 1. Notify 通知极快闪现
6+ * 2. 代码编辑器 cmView 滚动不跟手
7+ * 详见:https://github.com/sub-store-org/Sub-Store/issues/486
8+ * 解决方案:让动画和过渡完全禁用,针对性处理Notify和代码编辑器样式
9+ */
10+ @media (prefers-reduced-motion : reduce) {
11+ * ,
12+ * ::before ,
13+ * ::after {
14+ animation-duration : 0s !important ;
15+ animation-iteration-count : 1 !important ;
16+ transition-duration : 0s !important ;
17+ scroll-behavior : auto !important ;
18+ }
19+
20+ /* 需要保持动画的元素:添加 .keep-motion 类或使用特定前缀 */
21+ .keep-motion ,
22+ .keep-motion * ,
23+ [class ^= " Toastify" ],
24+ [class *= " Toastify" ],
25+ [class ^= " nut-toast" ],
26+ [class ^= " nut-overlay" ] {
27+ animation-duration : 0.5s !important ;
28+ transition-duration : 0.5s !important ;
29+ }
30+
31+ // NutUI Toast.loading 动画
32+ .nut-toast-loading .nut-toast-icon-wrapper {
33+ animation : rotation 1s linear infinite !important ;
34+ }
35+
36+ .cmviewRef ,
37+ .cm-scroller {
38+ scroll-behavior : auto !important ;
39+ }
40+ }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import '@/plugin/touch.js'
1313import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' ;
1414
1515import 'modern-css-reset/dist/reset.min.css' ;
16+ import '@/assets/styles/reduced-motion-fix.scss' ;
1617import { createPinia } from 'pinia' ;
1718import 'virtual:svg-icons-register' ;
1819import { createApp } from 'vue' ;
You can’t perform that action at this time.
0 commit comments