Last active
October 20, 2025 17:05
-
-
Save scmx/eca72d44afee0113ceb0349dd54a84a2 to your computer and use it in GitHub Desktop.
Revisions
-
scmx revised this gist
Mar 10, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ Answer: No, but you don't need it, since [GFM allows embedding HTML inside Markd #### Example <details open> <summary>Shopping list</summary> * Vegetables -
scmx revised this gist
Mar 10, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Answer: No, but you don't need it, since [GFM allows embedding HTML inside Markd ```markdown #### Example <details open> <summary>Shopping list</summary> * Vegetables -
scmx revised this gist
Dec 6, 2021 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,11 +48,7 @@ Answer: No, but you don't need it, since [GFM allows embedding HTML inside Markd ### More about details/summary Browser support is good https://caniuse.com/#feat=details It falls back to being expanded all the time. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details Similar gist https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d -
scmx revised this gist
Oct 10, 2020 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,8 +44,7 @@ Answer: No, but you don't need it, since [GFM allows embedding HTML inside Markd </details> ``` *Remember that blank lines are needed before/after a section of markdown that is within an html tag, otherwise the markdown won't work* ### More about details/summary -
scmx revised this gist
Sep 27, 2018 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,4 +54,6 @@ How about browser support? https://caniuse.com/#feat=details > IE and Edge currently don't support it. But those users will just see it expanded all the time Here's a polyfill https://github.com/rstacruz/details-polyfill https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details Similar gist https://gist.github.com/ericclemmons/b146fe5da72ca1f706b2ef72a20ac39d -
scmx revised this gist
Sep 27, 2018 . No changes.There are no files selected for viewing
-
scmx revised this gist
Sep 27, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,8 +44,8 @@ Answer: No, but you don't need it, since [GFM allows embedding HTML inside Markd </details> ``` *Remember to put a blank line after the `<summary>` start tag and before the `</summary>` end tag, otherwise the markdown inside will not work.* ### More about details/summary -
scmx revised this gist
Sep 27, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ ``` **Is there a special GFM (GitHub Flavoured Markdown) syntax for using `<details>` `<summary>` on GitHub?** Answer: No, but you don't need it, since [GFM allows embedding HTML inside Markdown](https://github.github.com/gfm/#html-block). #### Example -
scmx revised this gist
Sep 27, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ ``` **Is there a special GFM (GitHub Flavoured Markdown) syntax for using `<details>` `<summary>` on GitHub?** Answer: No, but you don't need it, since GFM [allows embedding HTML inside Markdown](https://github.github.com/gfm/#html-block). #### Example -
scmx revised this gist
Sep 27, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,9 @@ **Firstly, what is `<details>` `<summary>`?** > The HTML Details Element (`<details>`) creates a disclosure widget in which > information is visible only when the widget is toggled into an "open" state. > A summary or label can be provided using the `<summary>` element. > https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details. ### Example -
scmx revised this gist
Sep 27, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,7 @@ Answer: No, but you don't need it, since GFM allows embedding HTML inside Markdo * Fruits * Fish </details> #### Code @@ -41,7 +41,7 @@ Answer: No, but you don't need it, since GFM allows embedding HTML inside Markdo * Fruits * Fish </details> ``` Remember to put a blank line after the `<summary>` start tag and before -
scmx revised this gist
Sep 27, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,10 +9,10 @@ ### Example <details><summary>Toggle me!</summary>Peek a boo!</details> ```html <details><summary>Toggle me!</summary>Peek a boo!</details> ``` **Is there a special GFM (GitHub Flavoured Markdown) syntax for using `<details>` `<summary>` on GitHub?** -
scmx created this gist
Sep 27, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,57 @@ # How to use `<details>` `<summary>` expandable content on GitHub with Markdown **Firstly, what is `<details>` `<summary>`?** > The HTML Details Element (<details>) creates a disclosure widget in which > information is visible only when the widget is toggled into an "open" state. > A summary or label can be provided using the <summary> element. > https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details. ### Example <details><summary>Toggle me!</summary>Peek a boo!</detail> ```html <details><summary>Toggle me!</summary>Peek a boo!</detail> ``` **Is there a special GFM (GitHub Flavoured Markdown) syntax for using `<details>` `<summary>` on GitHub?** Answer: No, but you don't need it, since GFM allows embedding HTML inside Markdown. #### Example <details> <summary>Shopping list</summary> * Vegetables * Fruits * Fish </summary> #### Code ```markdown #### Example <details> <summary>Shopping list</summary> * Vegetables * Fruits * Fish </summary> ``` Remember to put a blank line after the `<summary>` start tag and before the `</summary>` end tag, otherwise the markdown inside will not work. ### More about details/summary How about browser support? https://caniuse.com/#feat=details > IE and Edge currently don't support it. But those users will just see it expanded all the time Here's a polyfill https://github.com/rstacruz/details-polyfill https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details