Merge pull request #7657 from mgeier/css-margins

basic theme: CSS margin overhaul
This commit is contained in:
Takeshi KOMIYA 2020-06-08 02:24:23 +09:00 committed by GitHub
commit 2ed20853ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;