
Sign up to save your podcasts
Or


2019, I proposed an idea to
Fun
Try on Codepen
Instead of inlining a CSS variable for each element:
You can use sibling-index() to retrieve it just in time instead of doing the
Clean that HTML up to make room for sibling-index() by removing all the inline
and then drop in this new magic bomb:
and now you have a 100ms staggered crossfade transition effect 🤓
There's nothing stopping you from using sibling-index() to stagger a color
Here the hue increments by 50 each element.
You could easily add a min() or clamp() or trig functions to help you too.
Share with me what you build!
By 2019, I proposed an idea to
Fun
Try on Codepen
Instead of inlining a CSS variable for each element:
You can use sibling-index() to retrieve it just in time instead of doing the
Clean that HTML up to make room for sibling-index() by removing all the inline
and then drop in this new magic bomb:
and now you have a 100ms staggered crossfade transition effect 🤓
There's nothing stopping you from using sibling-index() to stagger a color
Here the hue increments by 50 each element.
You could easily add a min() or clamp() or trig functions to help you too.
Share with me what you build!