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 Aug 22, 2020
1 parent 190f32b commit a8ae966
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
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

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pydata_sphinx_theme/static/webpack-macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
{% endmacro %}

{% macro head_pre_bootstrap() %}
<link rel="stylesheet" href="{{ pathto('_static/css/index.ce93c4bad7c1e5d5e6f0259f1a164f49.css', 1) }}">
<link rel="stylesheet" href="{{ pathto('_static/css/index.d431a4ee1c1efae0e38bdfebc22debff.css', 1) }}">
{% endmacro %}

{% macro head_js_preload() %}
<link rel="preload" as="script" href="{{ pathto('_static/js/index.6f94ef916480b5a8afd0.js', 1) }}">
<link rel="preload" as="script" href="{{ pathto('_static/js/index.30270b6e4c972e43c488.js', 1) }}">
{% endmacro %}

{% macro body_post() %}
<script src="{{ pathto('_static/js/index.6f94ef916480b5a8afd0.js', 1) }}"></script>
<script src="{{ pathto('_static/js/index.30270b6e4c972e43c488.js', 1) }}"></script>
{% endmacro %}
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 a8ae966

Please sign in to comment.