Re:GitHub Collapsible Markdown
by chadlavi on Thursday March 05, 2020 @11:45AM
(#22495219)
... you mean embedded HTML in a markdown file? that's nothing new.
[ Parent
| on HN ]
Here's the MDN page some of the sibling comments might want to see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/de...
The “new” thing (if you didn’t know it before) is that GitHub applies a collapse/expand behavior to <details> elements.
This is an actual HTML tag, not a github thing
Isn't that the default behavior of <details> in html documents? Am I missing something?
^ this is what I mean, yeah. Isn't that the expected behavior?
Your comment is accurate but I think its the fact that GitHub styles it in that way. I do wish it was possible to use markdown-types of elements in this way so that it could fallback on non-GitHub rendered web pages, or still look good in a text editor vs. HTML tags all over the place.
Maybe something like
^ Header
^^^
Collapsed
^^^
Similar to code blocks with the ``` syntax. I dunno.
> its the fact that GitHub styles it in that way
GitHub hardly styles it at all. It applies a margin-top on top of what normalize.css does. It's 99% your browser's default style sheet at work.