Sublime Forum

Make better READMEs on Github

#1

Good day!

I just discovered that Github supports collapsible content in Markdown files via the following HTML5 element:

<details>
<summary>A header for your collapsible content</summary>

Code example:

    ...
    ...
    ... (or use the backticks, whatever works)

Some more markdown content.
</details>

The details sections do not collapse on all browsers, but most I tested with.

Happy coding!

2 Likes

#2

Sounds useful. Do you have information on which browsers specifically it does and does not work on? Is it Internet Explorer and edge? http://caniuse.com/#feat=details

Do the HTML tags get carried over to packagecontrol.io?

0 Likes

#3

I.E. and Edge don’t like <details>. Btw you can show them as open via <details open>...</details>.

0 Likes