mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
This PR adds the `collapsible` and option to the core admonition type directives, which are propagated to the nodes, e.g. ```restructuredtext .. admonition:: title :collapsible: content .. note:: content :collapsible: closed ``` For the HTML5 writer, this replaces the outer `div` with a `details` tag, and the title `p` with a `summary` tag (with an `open` attribute if set), e.g. ```html <div class="admonition note"> <p class="admonition-title">Note</p> <p>hallo</p> </div> ``` changes to ```html <details class="admonition note" open="open"> <summary class="admonition-title">Note</summary> <p>hallo</p> </details> ``` Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>