running paused
paused paused
paused running
paused paused
There's a number of ways to ensure this play state sequence but, notably, animations aren't supposed to be able to directly control the state of other animations, so we have to rely on tricks there too. Static:
--in: 1;
--out: calc(var(--in) + 1);
capture:
--held: var(--out);
hoist:
--in: var(--held);
That's the basics!
1) make an api request from CSS that responds with data encoded into height and width
2) use container queries and tan(atan2()) in CSS to read the dimensions of the response into 16 bit integers
3) a CSS hack that allows the document :root to capture and hold --var-data computed from several layers of nested DOM, hoisting it back up and holding it in a paused animation
Chrome desktop only for now