Skip to content

Commit 4e3bc4f

Browse files
choldgrafjorisvandenbossche
authored andcommitted
Adding left margin to lists in admonition (#231)
1 parent 6bc74c5 commit 4e3bc4f

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

docs/demo/demo.rst

+7
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,13 @@ Admonitions
409409
Equations within a note:
410410
:math:`G_{\mu\nu} = 8 \pi G (T_{\mu\nu} + \rho_\Lambda g_{\mu\nu})`.
411411

412+
.. Note:: Lists in admonitions.
413+
414+
1. Here's a list item
415+
2. And another list item
416+
417+
They should be in-line with the text around them!
418+
412419
.. Tip:: 15% if the service is good.
413420

414421
+---------+

pydata_sphinx_theme/static/css/index.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scss/_admonitions.scss

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
padding: 0 1.4rem;
2121
}
2222

23+
// Lists need to have left margin so they don't spill into it
24+
> ol, > ul {
25+
margin-left: 1em;
26+
}
27+
2328
// Defaults for all admonitions
2429
.admonition-title {
2530
position: relative;

0 commit comments

Comments
 (0)