Reveal on scroll
What it is
A block that fades or slides in when you scroll to it. Pure visual rhythm; it carries no information.
How to write it
Four effects
Any other value reports DIR-206 and lists the valid ones.
What comes out
With JavaScript off the content is simply visible, with no animation. The test is simple: the animation carries no information, so removing it loses nothing.
Turning on "reduce motion" in the operating system also disables it — via the CSS prefers-reduced-motion query, with nothing for the reader to do.
Traps
Never hide anything in here
The entire purpose is rhythm. Anything that would be lost without the animation does not belong in this directive.
- Wrapping every block kills the rhythm it was meant to create. Two or three per document is plenty