Loading video...
Video Failed to Load
Little CSS Christmas tree for the holidays ๐ Powered by CSS custom properties ๐ช ~100 lines of CSS The trick is in the animation-delay โจ For example; <div class=๐ด style="--index: 2;"> .๐ด { animation-delay: calc(var(--index) * -0.2s); } CodePen.IO link below! ๐
374,796 views โข 3 years ago โขvia X (Twitter)
10 Comments

Here's that @CodePen link! ๐ ๐ป Have a play with the custom properties set on :root to see how the behavior changes ๐ค You could make the CSS smaller, add layers, more baubles, etc. Rustled this one up over breakfast after seeing something in the mall ๐

@CodePen Holy mother of Christmas. You never cease to amaze me!

@CodePen "Mother of Christmas" ๐ Happy Holidays my friend! ๐

@TSplone @CodePen Nice, I will make a SwiftUI version

@CodePen I don't know if you did it in purpose but you have an interesting effect there. Try asking people in which direction are the lights rotating ๐๐

@CodePen This is insane ๐ณ๐๐ผ

@smashingmag @CodePen the "over breakfast" hurt my soul :(

@CodePen Hi there! What a great CSS Christmas tree! I love seeing how creative people can get with the power of CSS and custom properties. Thanks for sharing your amazing work and making this holiday season a little brighter!

@haroldao_ @CodePen really cool, makes me wanna try this ๐

@CodePen I remember my first algorithm course at university 9 years ago, I had to make a christmas three with loops and conditions ๐
