Hacker News new | ask | show | jobs
by blue4 2658 days ago
wow this is excellent, <details>/<summary> are good tricks
2 comments

Except for the "works everywhere" suggestion...

https://caniuse.com/#feat=details

And here I thought Edge was a modern browser.

It's a basic DOM element — a block of content. Without native support, it's simply shown by default, instead of hidden by default, so nothing is broken, and even the default on non-supporting browsers can be changed with JS and CSS.

If anything, this is the works everywheriest of things that "work everywhere" in post-2010 web development. Some other stuff actually breaks accessibility by default.

Thx. Good to know. In that case, selective usage seems like good policy.
Given that Edge has less than 5% marketshare globally (depending on the source of the information), I would say that fretting over compatibility with it is not a priority. And given that MS is moving Edge to Chromium rendering engine, I assume this will solve the compat problem.
5% can still be a decent number of users, and tends to trend even higher in certain segments (state and local government, smaller "old economy" businesses)
And contrary to the article, it is possible to change their style!