From 1c9aa64157dc0b29076cc2290ba49c3f74b7486a Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 7 Jun 2022 18:54:17 +0200 Subject: [PATCH 1/2] CSS: Fix compound paragraphs for docutils 0.18 --- .../insipid/static/insipid.css_t | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/insipid_sphinx_theme/insipid/static/insipid.css_t b/src/insipid_sphinx_theme/insipid/static/insipid.css_t index 8c70418..74765bf 100644 --- a/src/insipid_sphinx_theme/insipid/static/insipid.css_t +++ b/src/insipid_sphinx_theme/insipid/static/insipid.css_t @@ -210,21 +210,22 @@ section > hr.docutils { margin-right: -7px; } -div.compound { +div.compound:not(.toctree-wrapper) { margin-top: 1em; margin-bottom: 1em; } -div.compound > .compound-first { - margin-top: 0; +div.compound:not(.toctree-wrapper) > * { + margin-top: 0.2em; margin-bottom: 0.2em; } -div.compound > .compound-middle { - margin-top: 0.2em; +div.compound:not(.toctree-wrapper) > *:first-child { + margin-top: 0; margin-bottom: 0.2em; } -div.compound > .compound-last { + +div.compound:not(.toctree-wrapper) > *:last-child { margin-top: 0.2em; margin-bottom: 0; } From 6b2d522606e8bee374f40a4ccc6e85b3cb241558 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 7 Jun 2022 19:21:30 +0200 Subject: [PATCH 2/2] CSS: support for nav.contents (docutils 0.18) --- .../insipid/static/insipid.css_t | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/insipid_sphinx_theme/insipid/static/insipid.css_t b/src/insipid_sphinx_theme/insipid/static/insipid.css_t index 74765bf..0dd0342 100644 --- a/src/insipid_sphinx_theme/insipid/static/insipid.css_t +++ b/src/insipid_sphinx_theme/insipid/static/insipid.css_t @@ -359,8 +359,10 @@ table.autosummary span.pre { /* -- admonitions ----------------------------------------------------------- */ div.topic, aside.topic, -div.sidebar, aside.sidebar { +div.sidebar, aside.sidebar, +nav.contents { border: none; + padding: 7px; } .section > div.admonition, @@ -368,7 +370,10 @@ section > div.admonition, div.body > div.admonition, .section > .topic, section > .topic, -div.body > .topic { +div.body > .topic, +.section > nav.contents, +section > nav.contents, +div.body > nav.contents { margin: 10px -7px; } @@ -379,6 +384,7 @@ aside.sidebar { div.admonition > p.admonition-title, .topic > p.topic-title, +nav.contents > p.topic-title, .sidebar > p.sidebar-title { margin: -7px -7px 7px -7px; padding: 4px 7px; @@ -396,16 +402,22 @@ div.admonition > p.admonition-title, div.admonition > p.admonition-title + *, .topic > p.topic-title + *, +nav.contents > p.topic-title + *, .sidebar > p.sidebar-title + * { margin-top: 0; } div.admonition > :first-child:not(.admonition-title), div.topic > :first-child:not(.topic-title), -aside.topic > :first-child:not(.topic-title) { +aside.topic > :first-child:not(.topic-title), +nav.contents > :first-child:not(.topic-title) { margin-top: 0; } +nav.contents > :last-child { + margin-bottom: 0; +} + div.admonition { background-color: #e4ebf2; } @@ -430,11 +442,12 @@ div.admonition.warning > p.admonition-title { background-color: #f0d5b8; } -div.topic, aside.topic { +div.topic, nav.contents, aside.topic { background-color: #fff0eb; } -.topic > p.topic-title { +.topic > p.topic-title, +nav.contents > p.topic-title { background-color: #f0dbd4; }