Overflow controls whether content extending beyond a containing box remains visible. Setting `overflow: hidden` clips the excess, which is useful when a card reveals its paragraph and link through an animation. section 5.5
Use overflow deliberately when building animated interfaces:
- Combine overflow with `opacity` and `transform` so partially visible content does not spoil the hidden state. section 5.5
- Remember that overflow changes discretely: it is either visible or hidden, unlike an animatable width. section 11.6.3
Reveal a card’s hidden content
A card begins with `height: 5rem` and `overflow: hidden`, keeping its paragraph and link out of view. On hover or `:focus-within`, its height expands and the overflow remains visible enough for the content to animate into place.
Synchronize an expanding share menu
A share menu keeps `overflow: hidden` while its width closes or opens. JavaScript listens for `transitionstart` and `transitionend`, hiding overflow immediately during closing and making it visible after opening finishes.
