feat(ui): add reduced-motion floor and tasteful hover micro-interactions
Global @media (prefers-reduced-motion: reduce) rule in MuiCssBaseline collapses every animation/transition duration to near-zero at once -- covers MUI's own Dialog/Menu/Collapse/ripple transitions and every hover-lift added below, so accessibility doesn't need re-checking per-component as more motion gets added later. Dashboard stat tiles and Kanban cards get a subtle hover lift (shadow deepens, translateY(-2px)/-1px), matching the hover pattern the landing page's feature cards already had -- these are the two places a small lift reads as an affordance rather than noise: stat tiles are dashboard-customization-adjacent, and kanban cards are literally draggable, so the lift reinforces the existing grab-cursor signal instead of competing with it. Left everything else alone -- most cards on this app hold passive content, not something to invite a hover response.
This commit is contained in:
@@ -254,6 +254,18 @@ export const getTheme = (_mode: "light" | "dark") => {
|
||||
WebkitFontSmoothing: "antialiased",
|
||||
MozOsxFontSmoothing: "grayscale",
|
||||
},
|
||||
// A global floor under every animation added this session (card hover-lift,
|
||||
// MUI's own Dialog/Menu/Collapse transitions, ripple) -- users who set this OS/
|
||||
// browser preference get near-instant, non-animated interactions everywhere at
|
||||
// once, rather than each component needing its own reduced-motion check.
|
||||
"@media (prefers-reduced-motion: reduce)": {
|
||||
"*, *::before, *::after": {
|
||||
animationDuration: "0.01ms !important",
|
||||
animationIterationCount: "1 !important",
|
||||
transitionDuration: "0.01ms !important",
|
||||
scrollBehavior: "auto !important",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
MuiPaper: {
|
||||
|
||||
Reference in New Issue
Block a user