Russian doll bears by Jhey Tompkins on CodePen
Open on CodePen ↗Click a nesting-doll bear and it opens to show a smaller one, down to the last, then a reset button puts them all back.
Jhey Tompkins explained the build: each bear is a checkbox and label, and the adjacent sibling combinator reveals the next one. Chained keyframe animations timed with custom properties open the lids, and a form reset input clears the scene without JavaScript. The bears are drawn as inline SVG.
interactiveart:checkedtransition
The modern.css newsletter
New CSS each month, and new things in the Atlas. 806 subscribers. Past issues
by Jhey Tompkins
by Kiarash Zarinmehr
by Ricardo Oliva Alonso