Files
leadboard/buttons.css
walkdoggo.yehandClaude Sonnet 5.5 308c96fc3f
CI / build (push) Successful in 34s
共用按鈕樣式表:滑過與按下的極小動畫
新增 buttons.css,全站按鈕共用 120ms 顏色轉場與按下時 3% 微縮;尊重減少動態效果設定。

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VDJVpPiGiWjJP1yVvvGhzQ
2026-11-23 09:16:42 +00:00

55 lines
1.7 KiB
CSS

/* Button motion: one shared, very small hover and press language for every page.
Each page keeps its own hover colours; this file only adds the easing and the press-down. */
button,
.btn,
.link-button,
select.btn-outline {
transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out,
filter 120ms ease-out, box-shadow 120ms ease-out, transform 120ms ease-out;
}
/* Press down: a 3% shrink that springs back. Disabled controls never move. */
button:not(:disabled):active,
a.btn:active,
.btn:not(:disabled):not(select):active {
transform: scale(0.97);
transition-duration: 60ms;
}
/* Small, dense controls shrink a little less so they do not look jumpy. */
table button:not(:disabled):active,
.sx-row button:not(:disabled):active,
.sx-pick button:not(:disabled):active,
.role-seg button:not(:disabled):active,
.theme-toggle button:not(:disabled):active,
.theme button:not(:disabled):active,
.link-button:not(:disabled):active {
transform: scale(0.98);
}
button:disabled {
transition: none;
}
/* Reduced motion: keep the colour easing, drop the press-down. */
@media (prefers-reduced-motion: reduce) {
button,
.btn,
.link-button,
select.btn-outline {
transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out;
}
button:not(:disabled):active,
a.btn:active,
.btn:not(:disabled):not(select):active,
table button:not(:disabled):active,
.sx-row button:not(:disabled):active,
.sx-pick button:not(:disabled):active,
.role-seg button:not(:disabled):active,
.theme-toggle button:not(:disabled):active,
.theme button:not(:disabled):active,
.link-button:not(:disabled):active {
transform: none;
}
}