Kevin Powell - CommunityKP-C
Kevin Powell - Communityβ€’10mo agoβ€’
3 replies
depthark

Animated details element using ::details-content

Hi, I'm playing with the pseudo-element ::details-content. I'm trying to animate the height. When I go from the closed state to open, everything is fine. When I go from the open state to closed, the height animation of the content doesn't work. I tried applying transition-behavior: allow-discrete; and @starting-style, but it didn't help...πŸ™ˆ Is there a way to solve this? Thanks a lot. https://codepen.io/luko248/pen/ZEXWmBX
Was this page helpful?