refactor(config): motion polish and reduced-motion coverage pass

This commit is contained in:
Supra4E8C
2026-08-06 03:02:02 +08:00
parent 38ee01c0e0
commit 00f34bc3e5
3 changed files with 29 additions and 4 deletions
@@ -53,7 +53,7 @@
width: 16px;
height: 16px;
color: var(--muted-foreground);
transition: transform 200ms ease;
transition: transform var(--dur-hover, 200ms) var(--ease-out-strong, ease-out);
flex-shrink: 0;
.root[open] & {
@@ -70,3 +70,27 @@
padding: 0;
border-top: 1px solid var(--border-color);
}
/* 展开时内容 160ms 淡入。只做透明度、不做高度动画 ——
与程序化 details.open = true(搜索跳转强制展开)不会互相打架。 */
.root[open] > .content,
.root[open] > .contentFlush {
animation: collapsible-content-in var(--dur-press, 160ms) var(--ease-out-strong, ease-out);
}
@keyframes collapsible-content-in {
from {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.chevron {
transition: none;
}
.root[open] > .content,
.root[open] > .contentFlush {
animation: none;
}
}
@@ -1,7 +1,7 @@
@use '../../../styles/variables' as *;
@use '../../../styles/mixins' as *;
$diff-mono: 'Consolas', 'Monaco', 'Menlo', 'SF Mono', monospace;
$diff-mono: $font-mono;
$diff-font-size: 12px;
$diff-line-height: 20px;
$diff-gutter-width: 50px;
@@ -19,9 +19,10 @@
}
}
/* 首载入场:0.45s 强减速上浮(与全站卡片入场同拍),仅挂载时播一次 */
/* 首载入场:0.45s 强减速上浮(与全站卡片入场同拍),排在头部级联
(标题 0 / meta 70 / 动作 140 / 工具栏 210 / tabs 280ms)之后收尾,仅首载播一次 */
.cardEnter {
animation: config-card-in 0.45s var(--ease-out-strong, ease-out) 0.28s backwards;
animation: config-card-in 0.45s var(--ease-out-strong, ease-out) 0.32s backwards;
}
@keyframes config-card-in {