Dark Mode and Reduced Motion
RULES.md
Every element responds to dark mode and respects reduced motion. Colors an element sets change in dark mode: take them from DDD tokens (which have dark values) or switch them with `light-dark()`, `prefers-color-scheme` or `color-scheme`; never hard-code colors that render the same in both schemes. With `prefers-reduced-motion: reduce`, no CSS animation, transition or `element.animate()` longer than 10ms runs on the element or in its shadow root, on load or on hover/focus. The webcomponents `dark-motion` check enforces this for every element a pull request changes; its baseline (`scripts/dark-motion.baseline.json`) only shrinks. Contrast in each scheme is the contrast check's job. In PRAW RULES.md (scope: webcomponents). Enforced by dark-motion. The dark-motion check opens each changed element's demo in light and dark with reduced motion on, and fails the pull request on a new failure.
Connects to
- Web Component Development includes this
- dark-motion enforces this
- Serves Accessible
- Applies to Web components
- Applies to DDD