Using CSS Transitions on Auto Dimensions | CSS-Tricks - CSS-Tricks
We've all been there. You've got an element you want to be able to collapse and expand smoothly using CSS transitions, but its expanded size needs to be
Hey, guess what? CSS is now able to transition to height: auto . It’s still a work in progress, but you can get the details here in a more recent article . We’ve all been there. You’ve got an element you want to be able to collapse and expand smoothly using CSS transitions, but its expanded size needs to be content-dependent. You’ve set transition: height 0.2s ease-out . You’ve created a collapsed CSS class that applies height: 0 . You try it out, and… the height doesn’t transition. It snaps between the two sizes as if transition had never been set. Af
related reading
- Animating height: auto — nemzes.netnemzes.net
- Transitionsanimations.dev
- An Interactive Guide to CSS Transitions • Josh W. Comeaujoshwcomeau.com
- Details That Make Interfaces Feel Betterjakub.kr
- Inside Framer's Magic Motionnan.fyi
- On UI Animations - Shu Dingshud.in
- Transitions.dev — Essential transitions for web appstransitions.dev
- will-change in CSSjakub.kr
- A Complete Guide to CSS Concepts and Fundamentalstania.dev
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- Getting sticky with it — Troubleshooting CSS sticky positioning - DEV Communitydev.to