Get the latest tech news

New Magic for Animations in CSS


Chase McCoy explores, builds, & writes about the web.

There are two new features coming to CSS that will make it much easier to further avoid JavaScript when implementing animations: You can also do the same thing with a CSS transition, but you’ll need to set the new transition-behavior property to allow-discrete for that to work. Again, we typically use JavaScript for this today to ensure the initial styles are set properly and our element doesn’t display visually on the page before it has animated.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of animations

animations

Photo of css

css

Photo of new Magic

new Magic

Related news:

News photo

Old dogs, new CSS tricks

News photo

Animating Ptolemy's Equant with Python, SVG, and CSS

News photo

Matcha.css – Drop-in semantic styling library in pure CSS