Only three lines of code and you have a smooth transition toĀ height: auto
& {
interpolate-size: allow-keywords;
}
p {
transition: 1s;
}
p:not(:hover) {
height: 5lh;
}
TheĀ interpolate-size: allow-keywords
Ā is doing all the magic. ReadĀ Animate to height: auto; (and other intrinsic sizing keywords) in CSSĀ for more detail.
Subscribe to get the latest posts sent to your email.