Hacker News new | ask | show | jobs
by spread_love 1047 days ago
Most of these aren't widely used because they were quaint attempts at solving problems that no longer exist, could be better solved with CSS (as the author concedes with <small>), and very much depend on browser implementation.

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.

2 comments

> 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).

Thanks! I should have specified it's impossible without a fixed height (height: auto).
<small> used to be a formatting tag, but with HTML5 it became a “fine print” tag.[1] Formatting-only tags like <font> have long been deprecated and fallen out of use.

  [1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small
...and <i> is supposed to mean "idiomatic text" now but let's be honest it's never used that way