Hacker News new | ask | show | jobs
by lelanthran 1047 days ago
> I was excited when <details> and <summary> landed in all evergreen browsers for example, but just to get the content to slide open (guiding the user) instead of pop open requires JS (the best implementations I've seen use WAAPI), Safari adds a proprietary pseudo element, etc.

It is possible to have sliding animations without JS, it just isn't very pretty on close (on open looks fine):

https://codepen.io/dada1smo/pen/LYydWBg

(note, that is not mine, I found it via a comment on a css-tricks link).

1 comments

Thanks! I should have specified it's impossible without a fixed height (height: auto).