From 6e3ae3fc6f640119d7bbbd9ddee4fd2713e4477c Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 12 May 2020 13:05:00 +0200 Subject: basic CSS: remove first/last-child margin not only for

--- sphinx/themes/basic/static/basic.css_t | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sphinx') diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 45908ece1..01cee109a 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -426,13 +426,13 @@ table.citation td { border-bottom: none; } -th > p:first-child, -td > p:first-child { +th > :first-child, +td > :first-child { margin-top: 0px; } -th > p:last-child, -td > p:last-child { +th > :last-child, +td > :last-child { margin-bottom: 0px; } @@ -505,11 +505,11 @@ ol.upperroman { list-style: upper-roman; } -li > p:first-child { +li > :first-child { margin-top: 0px; } -li > p:last-child { +li > :last-child { margin-bottom: 0px; } @@ -557,7 +557,7 @@ dl { margin-bottom: 15px; } -dd > p:first-child { +dd > :first-child { margin-top: 0px; } -- cgit v1.2.3 From 1b9e52613e8c498c80bc9051e60270a5cac0a052 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 12 May 2020 13:08:41 +0200 Subject: basic CSS: consistent 7px padding on topic and sidebar --- sphinx/themes/basic/static/basic.css_t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sphinx') diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 01cee109a..e572959be 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -316,7 +316,7 @@ img.align-default, .figure.align-default { div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; - padding: 7px 7px 0 7px; + padding: 7px; background-color: #ffe; width: 40%; float: right; @@ -336,7 +336,7 @@ div.admonition, div.topic, pre, div[class|="highlight"] { div.topic { border: 1px solid #ccc; - padding: 7px 7px 0 7px; + padding: 7px; margin: 10px 0 10px 0; overflow-x: auto; } -- cgit v1.2.3 From aad6c2d489689bb1dcac390a9ace8981819f2684 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 12 May 2020 13:22:53 +0200 Subject: basic CSS: Remove margin-bottom from last child in sidebar/topic/admonition --- sphinx/themes/basic/static/basic.css_t | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sphinx') diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index e572959be..1adf01368 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -360,10 +360,6 @@ div.admonition dt { font-weight: bold; } -div.admonition dl { - margin-bottom: 0; -} - p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; @@ -374,6 +370,14 @@ div.body p.centered { margin-top: 25px; } +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + /* -- tables ---------------------------------------------------------------- */ table.docutils { -- cgit v1.2.3 From 2c8de2b41e4b2854a6ada9767ec7fdd8b8de31ef Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 12 May 2020 14:56:03 +0200 Subject: basic CSS: remove margin-bottom in last element of

--- sphinx/themes/basic/static/basic.css_t | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sphinx') diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 1adf01368..d8875796a 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -575,6 +575,11 @@ dd { margin-left: 30px; } +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + dt:target, span.highlighted { background-color: #fbe54e; } -- cgit v1.2.3 From e0d884f39bd874d43eff377f048a81eb6dd76f2f Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 12 May 2020 15:14:45 +0200 Subject: basic CSS: ul/ol margins --- sphinx/themes/basic/static/basic.css_t | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'sphinx') diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index d8875796a..67ab2a63e 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -509,14 +509,30 @@ ol.upperroman { list-style: upper-roman; } -li > :first-child { +ol > li:first-child > :first-child, +ul > li:first-child > :first-child { margin-top: 0px; } -li > :last-child { +ol ol > li:first-child > :first-child, +ol ul > li:first-child > :first-child, +ul ol > li:first-child > :first-child, +ul ul > li:first-child > :first-child { + margin-top: revert; +} + +ol > li:last-child > :last-child, +ul > li:last-child > :last-child { margin-bottom: 0px; } +ol ol > li:last-child > :last-child, +ol ul > li:last-child > :last-child, +ul ol > li:last-child > :last-child, +ul ul > li:last-child > :last-child { + margin-bottom: revert; +} + dl.footnote > dt, dl.citation > dt { float: left; -- cgit v1.2.3 From 0dc6e3ac458dd6c10ed2c7bd03ca95bd694d7ec6 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 12 May 2020 15:56:39 +0200 Subject: basic CSS: move code block margin to outer
--- sphinx/themes/basic/static/basic.css_t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sphinx') diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 67ab2a63e..55ee887f3 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -680,6 +680,10 @@ span.pre { hyphens: none; } +div[class^="highlight-"] { + margin: 1em 0; +} + td.linenos pre { border: 0; background-color: transparent; @@ -688,7 +692,6 @@ td.linenos pre { table.highlighttable { display: block; - margin: 1em 0; } table.highlighttable tbody { @@ -717,11 +720,12 @@ table.highlighttable td.code { display: block; } +div.highlight pre, table.highlighttable pre { margin: 0; } -div.code-block-caption + div > table.highlighttable { +div.code-block-caption + div { margin-top: 0; } @@ -735,10 +739,6 @@ div.code-block-caption code { background-color: transparent; } -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - table.highlighttable td.linenos, div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ user-select: none; -- cgit v1.2.3 From 810f37c9cf41dd9f793148038b5c2f7ce5e23ec1 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Tue, 12 May 2020 16:25:32 +0200 Subject: basic CSS: Add hlist margin --- sphinx/themes/basic/static/basic.css_t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sphinx') diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 55ee887f3..841b652ae 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -482,6 +482,10 @@ table.field-list td, table.field-list th { /* -- hlist styles ---------------------------------------------------------- */ +table.hlist { + margin: 1em 0; +} + table.hlist td { vertical-align: top; } -- cgit v1.2.3