From 86f075929b8b83603d60c383706841b53487b2f1 Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Tue, 11 Jan 2022 11:46:36 -0800 Subject: [PATCH] FIX: Admonitions margin --- docs/conf.py | 5 +++++ docs/demo/demo.rst | 4 ---- src/pydata_sphinx_theme/assets/styles/_admonitions.scss | 7 +++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6846c32155..74903c3d5e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,6 +65,11 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +# -- Extension options ------------------------------------------------------- + +myst_enable_extensions = [ + "colon_fence", +] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/docs/demo/demo.rst b/docs/demo/demo.rst index ecd4fc930c..7a123c1302 100644 --- a/docs/demo/demo.rst +++ b/docs/demo/demo.rst @@ -15,10 +15,6 @@ Inline Markup Paragraphs contain text and may contain inline markup: *emphasis*, **strong emphasis**, ``inline literals``, standalone hyperlinks (http://www.python.org), external hyperlinks (Python_), internal cross-references (example_), -external hyperlinks with embedded URIs (`Python web site `__), footnote references -(manually numbered [1]_, anonymous auto-numbered [#]_, labeled auto-numbered [#label]_, or symbolic [*]_), -citation references ([12]_), substitution references (|example|), and _`inline hyperlink targets` -(see Targets_ below for a reference back to here). Character-level inline markup is also possible (although exceedingly ugly!) in *re*\ ``Structured``\ *Text*. Problems are indicated by problematic text (generated by processing errors; this one is intentional). diff --git a/src/pydata_sphinx_theme/assets/styles/_admonitions.scss b/src/pydata_sphinx_theme/assets/styles/_admonitions.scss index 2f09242e8d..b9073d6b10 100644 --- a/src/pydata_sphinx_theme/assets/styles/_admonitions.scss +++ b/src/pydata_sphinx_theme/assets/styles/_admonitions.scss @@ -19,8 +19,11 @@ div.admonition, } // Items after the title should be indented - p.admonition-title ~ * { - padding: 0 1.4rem; + p.admonition-title { + ~ * { + margin-left: 1.4rem; + margin-right: 1.4rem; + } } // Lists need to have left margin so they don't spill into it