Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding left margin to lists in admonition #231

Merged
merged 1 commit into from
Aug 22, 2020
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
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