From de43317396f79b5c75507406a0edaff920a27f0a Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Mon, 30 May 2022 12:50:55 +0100 Subject: [PATCH 1/2] Add `aside.topic` for Docutils 0.18+ --- sphinx/themes/basic/static/basic.css_t | 6 ++++-- sphinx/themes/bizstyle/static/bizstyle.css_t | 2 +- sphinx/themes/classic/static/classic.css_t | 2 +- sphinx/themes/epub/static/epub.css_t | 2 +- sphinx/themes/nature/static/nature.css_t | 2 +- sphinx/themes/nonav/static/nonav.css | 2 +- sphinx/themes/pyramid/static/epub.css | 2 +- sphinx/themes/pyramid/static/pyramid.css_t | 2 +- sphinx/themes/sphinxdoc/static/sphinxdoc.css_t | 2 +- sphinx/themes/traditional/static/traditional.css_t | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index a05c8ba0e89..9e5047afe6f 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -335,13 +335,13 @@ p.sidebar-title { font-weight: bold; } -div.admonition, div.topic, blockquote { +div.admonition, div.topic, aside.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ -div.topic { +div.topic, aside.topic { border: 1px solid #ccc; padding: 7px; margin: 10px 0 10px 0; @@ -380,6 +380,7 @@ div.body p.centered { div.sidebar > :last-child, aside.sidebar > :last-child, div.topic > :last-child, +aside.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; } @@ -387,6 +388,7 @@ div.admonition > :last-child { div.sidebar::after, aside.sidebar::after, div.topic::after, +aside.topic::after, div.admonition::after, blockquote::after { display: block; diff --git a/sphinx/themes/bizstyle/static/bizstyle.css_t b/sphinx/themes/bizstyle/static/bizstyle.css_t index 46573464679..b5c84e0bb59 100644 --- a/sphinx/themes/bizstyle/static/bizstyle.css_t +++ b/sphinx/themes/bizstyle/static/bizstyle.css_t @@ -306,7 +306,7 @@ div.quotebar { border: 1px solid #ccc; } -div.topic { +div.topic, aside.topic { background-color: #f8f8f8; } diff --git a/sphinx/themes/classic/static/classic.css_t b/sphinx/themes/classic/static/classic.css_t index 739def5cd49..58b55c8bf53 100644 --- a/sphinx/themes/classic/static/classic.css_t +++ b/sphinx/themes/classic/static/classic.css_t @@ -290,7 +290,7 @@ div.seealso { border: 1px solid #ff6; } -div.topic { +div.topic, aside.topic { background-color: #eee; } diff --git a/sphinx/themes/epub/static/epub.css_t b/sphinx/themes/epub/static/epub.css_t index 981baaab032..f7a12c0f044 100644 --- a/sphinx/themes/epub/static/epub.css_t +++ b/sphinx/themes/epub/static/epub.css_t @@ -245,7 +245,7 @@ p.sidebar-title { /* -- topics ---------------------------------------------------------------- */ -div.topic { +div.topic, aside.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; diff --git a/sphinx/themes/nature/static/nature.css_t b/sphinx/themes/nature/static/nature.css_t index 28a4f64c94f..f3c0d0224a6 100644 --- a/sphinx/themes/nature/static/nature.css_t +++ b/sphinx/themes/nature/static/nature.css_t @@ -194,7 +194,7 @@ div.seealso { border: 1px solid #ff6; } -div.topic { +div.topic, aside.topic { background-color: #eee; } diff --git a/sphinx/themes/nonav/static/nonav.css b/sphinx/themes/nonav/static/nonav.css index 98d2163a418..3bb152166eb 100644 --- a/sphinx/themes/nonav/static/nonav.css +++ b/sphinx/themes/nonav/static/nonav.css @@ -234,7 +234,7 @@ p.sidebar-title { /* -- topics ---------------------------------------------------------------- */ -div.topic { +div.topic, aside.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; diff --git a/sphinx/themes/pyramid/static/epub.css b/sphinx/themes/pyramid/static/epub.css index 165f41d5d6b..8606c8c8de0 100644 --- a/sphinx/themes/pyramid/static/epub.css +++ b/sphinx/themes/pyramid/static/epub.css @@ -254,7 +254,7 @@ div.seealso { border: 1px solid #ff6; } -div.topic { +div.topic, aside.topic { background-color: #eee; } diff --git a/sphinx/themes/pyramid/static/pyramid.css_t b/sphinx/themes/pyramid/static/pyramid.css_t index c8c05af3b19..b7fed29433f 100644 --- a/sphinx/themes/pyramid/static/pyramid.css_t +++ b/sphinx/themes/pyramid/static/pyramid.css_t @@ -245,7 +245,7 @@ div.seealso { padding: 10px 20px 10px 60px; } -div.topic { +div.topic, aside.topic { background: #eeeeee; border: 2px solid #C6C9CB; padding: 10px 20px; diff --git a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t index 1ff1d0291d8..b6de4ae6f2e 100644 --- a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t +++ b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t @@ -266,7 +266,7 @@ div.quotebar { border: 1px solid #ccc; } -div.topic { +div.topic, aside.topic { background-color: #f8f8f8; } diff --git a/sphinx/themes/traditional/static/traditional.css_t b/sphinx/themes/traditional/static/traditional.css_t index f98b337198a..b5b05dc2186 100644 --- a/sphinx/themes/traditional/static/traditional.css_t +++ b/sphinx/themes/traditional/static/traditional.css_t @@ -506,7 +506,7 @@ p.rubric { /* "Topics" */ -div.topic { +div.topic, aside.topic { background-color: #eee; border: 1px solid #ccc; padding: 0 7px 0 7px; From 6755290592176c1a4152f6aa291ffe94bb0f2b23 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Mon, 30 May 2022 12:57:35 +0100 Subject: [PATCH 2/2] Add `aside.sidebar` where it is missing --- sphinx/themes/agogo/static/agogo.css_t | 37 ++++++++++++++-------- sphinx/themes/epub/static/epub.css_t | 2 +- sphinx/themes/nonav/static/nonav.css | 2 +- sphinx/themes/pyramid/static/pyramid.css_t | 2 +- 4 files changed, 27 insertions(+), 16 deletions(-) diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t index 08a4db0ccd2..14c5e52ce13 100644 --- a/sphinx/themes/agogo/static/agogo.css_t +++ b/sphinx/themes/agogo/static/agogo.css_t @@ -271,7 +271,8 @@ div.document ol { /* Sidebar */ -div.sidebar { +div.sidebar, +aside.sidebar { width: {{ theme_sidebarwidth|todim }}; {%- if theme_rightsidebar|tobool %} float: right; @@ -281,26 +282,29 @@ div.sidebar { font-size: .9em; } -div.sidebar a, div.header a { +div.sidebar a, aside.sidebar a, div.header a { text-decoration: none; } -div.sidebar a:hover, div.header a:hover { +div.sidebar a:hover, aside.sidebar a:hover, div.header a:hover { text-decoration: underline; } -div.sidebar h3 { +div.sidebar h3, +aside.sidebar h3 { color: #2e3436; text-transform: uppercase; font-size: 130%; letter-spacing: .1em; } -div.sidebar ul { +div.sidebar ul, +aside.sidebar ul { list-style-type: none; } -div.sidebar li.toctree-l1 a { +div.sidebar li.toctree-l1 a, +aside.sidebar li.toctree-l1 a { display: block; padding: 1px; border: 1px solid #dddddd; @@ -310,37 +314,44 @@ div.sidebar li.toctree-l1 a { color: #2e3436; } -div.sidebar li.toctree-l2 a { +div.sidebar li.toctree-l2 a, +aside.sidebar li.toctree-l2 a { background-color: transparent; border: none; margin-left: 1em; border-bottom: 1px solid #dddddd; } -div.sidebar li.toctree-l3 a { +div.sidebar li.toctree-l3 a, +aside.sidebar li.toctree-l3 a { background-color: transparent; border: none; margin-left: 2em; border-bottom: 1px solid #dddddd; } -div.sidebar li.toctree-l2:last-child a { +div.sidebar li.toctree-l2:last-child a, +aside.sidebar li.toctree-l2:last-child a { border-bottom: none; } -div.sidebar li.toctree-l1.current a { +div.sidebar li.toctree-l1.current a, +aside.sidebar li.toctree-l1.current a { border-right: 5px solid {{ theme_headerlinkcolor }}; } -div.sidebar li.toctree-l1.current li.toctree-l2 a { +div.sidebar li.toctree-l1.current li.toctree-l2 a, +aside.sidebar li.toctree-l1.current li.toctree-l2 a { border-right: none; } -div.sidebar input[type="text"] { +div.sidebar input[type="text"], +aside.sidebar input[type="text"] { width: 170px; } -div.sidebar input[type="submit"] { +div.sidebar input[type="submit"], +aside.sidebar input[type="submit"] { width: 30px; } diff --git a/sphinx/themes/epub/static/epub.css_t b/sphinx/themes/epub/static/epub.css_t index f7a12c0f044..bd64a1bc868 100644 --- a/sphinx/themes/epub/static/epub.css_t +++ b/sphinx/themes/epub/static/epub.css_t @@ -230,7 +230,7 @@ p.rubric { /* -- sidebars -------------------------------------------------------------- */ -div.sidebar { +div.sidebar, aside.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; diff --git a/sphinx/themes/nonav/static/nonav.css b/sphinx/themes/nonav/static/nonav.css index 3bb152166eb..90c3300cf03 100644 --- a/sphinx/themes/nonav/static/nonav.css +++ b/sphinx/themes/nonav/static/nonav.css @@ -219,7 +219,7 @@ p.rubric { /* -- sidebars -------------------------------------------------------------- */ -div.sidebar { +div.sidebar, aside.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; diff --git a/sphinx/themes/pyramid/static/pyramid.css_t b/sphinx/themes/pyramid/static/pyramid.css_t index b7fed29433f..f093ba16493 100644 --- a/sphinx/themes/pyramid/static/pyramid.css_t +++ b/sphinx/themes/pyramid/static/pyramid.css_t @@ -155,7 +155,7 @@ div.sphinxsidebar .searchformwrapper { /* -- sidebars -------------------------------------------------------------- */ -div.sidebar { +div.sidebar, aside.sidebar { margin: 0 0 0.5em 1em; border: 2px solid #c6d880; background-color: #e6efc2;