Skip to content

Commit

Permalink
Adding left margin to lists in admonition (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf authored and jorisvandenbossche committed Aug 28, 2020
1 parent 6bc74c5 commit 4e3bc4f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/demo/demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,13 @@ Admonitions
Equations within a note:
:math:`G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})`.

.. Note:: Lists in admonitions.

1. Here's a list item
2. And another list item

They should be in-line with the text around them!

.. Tip:: 15% if the service is good.

+---------+
Expand Down
2 changes: 1 addition & 1 deletion pydata_sphinx_theme/static/css/index.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/scss/_admonitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
padding: 0 1.4rem;
}

// Lists need to have left margin so they don't spill into it
> ol, > ul {
margin-left: 1em;
}

// Defaults for all admonitions
.admonition-title {
position: relative;
Expand Down

0 comments on commit 4e3bc4f

Please sign in to comment.