Skip to content

Commit

Permalink
Fix field lists after switch to HTML5 writer
Browse files Browse the repository at this point in the history
- 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#6262)
- nature
- sphinxdoc

Fixes sphinx-doc#6604
  • Loading branch information
jakobandersen committed Aug 2, 2019
1 parent 68973e8 commit e3b6d01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
11 changes: 6 additions & 5 deletions sphinx/themes/basic/static/basic.css_t
Expand Up @@ -520,23 +520,24 @@ 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 {
content: ":";
}

dl.field-list > dd {
flex-basis: 70%;
padding-left: 1em;
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
Expand Down
5 changes: 0 additions & 5 deletions sphinx/themes/bizstyle/static/bizstyle.css_t
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion sphinx/themes/classic/static/classic.css_t
Expand Up @@ -287,7 +287,7 @@ code {
font-size: 0.95em;
}

th {
th, dl.field-list > dt {
background-color: #ede;
}

Expand Down

0 comments on commit e3b6d01

Please sign in to comment.