I love ditching JavaScript for HTML and CSS whenever I can. It's a core part of the Lean Web Club ethos. In particular, one of my favorite sets of HTML elements are
But one of the biggest complaints I've seen about this over the years is that unlike a JavaScript disclosure, there's no way to animate the expanding of the content with CSS using We've always had to use absolute heights, which resulted in some weird side-effects, so most folks steered away from it. So, I was delighted when Bramus from the Chrome Dev Rel team posted about a way to finally do this! The tl;dr version: add this to your stylesheet…
Then, you can
It's Chromium-only for now (in my testing, it works in Chrome and Edge work, but not Vivaldi), but a nice bit of progressive enhancement where supported. Cheers, Want to share this with others or read it later? View it in a browser. |
0 Komentar untuk "[Go Make Things] Animating height with only CSS"