Fix field lists after switch to HTML5 writer

- classic: Put the pink'ish colour back on the field type part (dt).
- basic: remove top margin on the field data to align with the type.
- basic: use grid display instead of flexbox to avoid fixed width on
  the field type part.

Other themes affected/fixed due to changes in basic:
- bizstyle (only technically, it already was fixed in
  sphinx-doc/sphinx#6262)
- haiku
- classic
- nature
- pyramid
- sphinxdoc

Fixes sphinx-doc/sphinx#6604
This commit is contained in:
Jakob Lykke Andersen
2019-08-02 14:45:10 +02:00
parent 4a1df77e33
commit 9dd768863c
3 changed files with 7 additions and 11 deletions

View File

@@ -520,14 +520,15 @@ dl.citation > dd:after {
}
dl.field-list {
display: flex;
flex-wrap: wrap;
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
flex-basis: 20%;
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
@@ -535,8 +536,8 @@ dl.field-list > dt:after {
}
dl.field-list > dd {
flex-basis: 70%;
padding-left: 1em;
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}

View File

@@ -412,15 +412,10 @@ p.versionchanged span.versionmodified {
dl.field-list > dt {
color: white;
padding-left: 0.5em;
padding-right: 5px;
background-color: #82A0BE;
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
background-color: #f7f7f7;
}

View File

@@ -292,7 +292,7 @@ code {
font-size: 0.95em;
}
th {
th, dl.field-list > dt {
background-color: #ede;
}