Transferring sibling-count() to a Parent Element
You can tell a parent element how many children it has with… scroll-driven animations??
You can tell a parent element how many children it has with… scroll-driven animations??
It’s an interesting and potentially useful trick to have an element know where it is on a grid. That’s tricky enough when the items are in one row/column, but what about when they span?
You can always easily style :hover, but what if you want the NEXT item to have styling too? Or, just a smidge harder, the PREVIOUS item. How about multiple in any direction?
You normally don’t think of images as overflowing themselves, nor can you put anything else inside to make it overflow, but actually…
Temani mimics a View Transition by placing items using their index and translations. The placement calculation change when the index changes, which is an animation opportunity!
The `rule` (and friends) CSS property allows us to draw markers (like borders) in the gaps between columns and rows (and flex items!)
This time we get into very smooth starts and stops for infinite animations using CSS. One of the tricks is layering on a transition on top of an animation.
Something like manipulating the speed of an animation isn’t a big deal, but it’s harder when the animation is *already running*. We got tricks.
Drawing an line with arrows pointing to the center of two arbitrary elements measuring and displaying the distance between them doesn’t seem like it would be possible in CSS alone… but…
What can we say except BOINNNGGG BOINNGGGGGG.
Master.dev donates to open source projects through thanks.dev and Open Collective, as well as donates to non-profits like The Last Mile, Annie Canons, and Vets Who Code.