Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,16 @@ Here's how they look right after one another:
.. toggle::

This is my second.

.. admonition:: A really long admonition that will take up multiple lines A really long admonition that will take up multiple lines
:class: toggle

Admonition content.

.. image:: https://jupyterbook.org/_static/logo.png

.. admonition:: A really long admonition that will take up multiple lines A really long admonition that will take up multiple lines

Admonition content.

.. image:: https://jupyterbook.org/_static/logo.png
10 changes: 8 additions & 2 deletions sphinx_togglebutton/_static/togglebutton.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@
}

/* Overrides for admonition toggles */
div.admonition.toggle-hidden {
height: 3em;

/* Titles should cut off earlier to avoid overlapping w/ button */
div.admonition.toggle p.admonition-title {
padding-right: 20%;
}

/* hides all the content of a page until de-toggled */
div.admonition.toggle-hidden .admonition-title ~ * {
height: 0;
margin: 0;
float: left; /* so they overlap when hidden */
opacity: 0;
visibility: hidden;
}
Expand Down