One line.
adjisena.com / lab
Expand / collapse
Height of any size, no measuring, interruptible mid-way. One-open-at-a-time below.
Rows animate from 0fr to 1fr, so the browser handles the real height.
Content fades and drifts in slightly after the height starts, and fades out faster than it closes, so text never looks clipped.
Closed panels use visibility: hidden after the transition ends, which keeps their links out of keyboard tab order.
Reduced-motion users get instant state changes.
Copy the Expand / collapse panels block from /assets/site.css and /assets/expand.js. Markup: .panel[data-panel] > .panel-toggle + .panel-body > .panel-inner.