A walkthrough of modern CSS entry and exit animations using @starting-style, CSS transitions, and the View transitions API. Key topics include: using @starting-style to define initial states without JavaScript class toggling, the advantage of CSS transitions over keyframes (cancelable mid-animation), animating the display property with 'allow-discrete', and using the View transitions API for smooth layout shifts when DOM elements are added or removed. The dialog element and popover API are shown as ideal use cases for @starting-style.
•8m watch time
Sort: