Skip to main content

reduced_motion_css

Function reduced_motion_css 

Source
pub fn reduced_motion_css() -> String
Expand description

The motion-off block, for a reader who has asked for less of it.

Every Motion and Cadence token resolves to 0ms. A zero-length transition jumps to its end state, so a notice that would fade is removed when its lifetime ends.

The blink needs one thing from the rule that consumes it, and it does not fall out of the zero on its own. A zero-length animation with no animation-fill-mode leaves the element in its base style, not at its last keyframe. So write the rule with the mark lit in the base style and the keyframes doing the dimming, never the other way round. Then reduced motion stills a lit mark, and the inverted spelling would blank it.

Moment tokens are not in the block.