-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Labels
Description
I think it would be useful to have a declarative way to apply styles (for example for starting animations), when an element has been scrolled into view. So this would be kind of like a declarative way to set up an intersection observer, and set a class name. And maybe you'd want to similarly have some kind of threshold.
I've seen plenty of sites that kick off animations (maybe fading in an image, or starting a complex animation) once an element is scrolled into view.
The reason for suggesting :ever-been-visible rather than :visible is to avoid cycles if the rules that apply when the selector matches cause the element to be moved out of view.
bkardell