Entry and exit transitions with modern CSS

Title “Enter And Exit CSS Transitions”, label display: none above a dashed empty square, an arrow, and label display: block above a yellow filled square.

Matt Croat shows how to animate elements as they appear and disappear: @starting-style sets initial values, transitions stay interruptible mid-animation, and allow-discrete handles properties like display that normally jump. The View Transition API completes the picture by animating layout changes between DOM states, with practical examples for <dialog> and popovers.

joyofcode.xyz/entry-and-exit-css-transitions