iter(g283): 补旋转缩放过渡的减少动效兜底

This commit is contained in:
HIsheR
2026-10-26 23:09:40 +08:00
parent d0e408fae6
commit 0c5701512a
4 changed files with 29 additions and 5 deletions
+11
View File
@@ -5871,3 +5871,14 @@ h5.ua-type-title { font-size: var(--ua-font-size-md); }
white-space: pre-wrap;
word-break: break-word;
}
/* ---- 减少动效:旋转 / 缩放一律退化为瞬时 ----
前两类(无限动画、悬停位移)已有专门兜底,但 rotate / scale 过渡属于第三类空间动效:
折叠箭头旋转、卡片按压缩放都靠它提供手感。减少动效下把过渡属性收窄成「只留颜色类」,
空间变换即时到位——状态仍然看得出变化,只是不再「动」。用一条通配规则覆盖全站,新增组件不必各自补。 */
@media (prefers-reduced-motion: reduce) {
[class^='ua-'],
[class*=' ua-'] {
transition-property: color, background-color, border-color, box-shadow, opacity, fill, stroke; /* 只保留不产生空间位移的属性 */
}
}