Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-06-07 20:24:23 +0300
committerGitHub <noreply@github.com>2020-06-07 20:24:23 +0300
commit2ed20853ed6ab3783aeb1ac4d874e0e9a1357108 (patch)
tree56f0bb4b0db9da13c1437774b7ed44b219c24746 /sphinx
parent7fa47e4b1b184ddab8827651548cedd62415fbcb (diff)
parent810f37c9cf41dd9f793148038b5c2f7ce5e23ec1 (diff)
Merge pull request #7657 from mgeier/css-margins
basic theme: CSS margin overhaul
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/themes/basic/static/basic.css_t67
1 files changed, 48 insertions, 19 deletions
diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t
index a7c58569f..cf169f5e3 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;
}
@@ -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 {
@@ -426,13 +430,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;
}
@@ -478,6 +482,10 @@ table.field-list td, table.field-list th {
/* -- hlist styles ---------------------------------------------------------- */
+table.hlist {
+ margin: 1em 0;
+}
+
table.hlist td {
vertical-align: top;
}
@@ -505,14 +513,30 @@ ol.upperroman {
list-style: upper-roman;
}
-li > p:first-child {
+ol > li:first-child > :first-child,
+ul > li:first-child > :first-child {
margin-top: 0px;
}
-li > p: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;
@@ -557,7 +581,7 @@ dl {
margin-bottom: 15px;
}
-dd > p:first-child {
+dd > :first-child {
margin-top: 0px;
}
@@ -571,6 +595,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;
}
@@ -655,6 +684,10 @@ span.pre {
hyphens: none;
}
+div[class^="highlight-"] {
+ margin: 1em 0;
+}
+
td.linenos pre {
border: 0;
background-color: transparent;
@@ -663,7 +696,6 @@ td.linenos pre {
table.highlighttable {
display: block;
- margin: 1em 0;
}
table.highlighttable tbody {
@@ -692,11 +724,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;
}
@@ -710,10 +743,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;