Using <details> in GitHub

Turns out you an use the <details> element in GitHub:

<details>
 <summary>Summary Goes Here</summary>
 ...this is hidden, collapsable content...
</details>

Handy if you have a rather big stack trace that might make your comment a tad too cluttered:

ezgif-842406230

Going into the rabbit hole it looks like support for this tag was initially requested back in 2014. In the issue raised it is mentioned that GitHub uses html-pipeline, making – if they use the default whitelist – all of these elements whitelisted:

h1 h2 h3 h4 h5 h6 h7 h8 br b i strong em a pre code img tt div ins del sup sub p ol ul table thead tbody tfoot blockquote dl dt dd kbd q samp var hr ruby rt rp li tr td th s strike summary details

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.