Skip to content

Commit 2cc6264

Browse files
authored
Merge pull request #7852 from mgeier/basic-css-simple-lists
basic CSS: Take "simple" lists into account, resuscitating the "html_compact_lists" config option
2 parents f743df6 + 82768d8 commit 2cc6264

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

sphinx/themes/basic/static/basic.css_t

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -513,28 +513,31 @@ ol.upperroman {
513513
list-style: upper-roman;
514514
}
515515

516-
ol > li:first-child > :first-child,
517-
ul > li:first-child > :first-child {
516+
:not(li) > ol > li:first-child > :first-child,
517+
:not(li) > ul > li:first-child > :first-child {
518518
margin-top: 0px;
519519
}
520520

521-
ol ol > li:first-child > :first-child,
522-
ol ul > li:first-child > :first-child,
523-
ul ol > li:first-child > :first-child,
524-
ul ul > li:first-child > :first-child {
525-
margin-top: revert;
521+
:not(li) > ol > li:last-child > :last-child,
522+
:not(li) > ul > li:last-child > :last-child {
523+
margin-bottom: 0px;
526524
}
527525

528-
ol > li:last-child > :last-child,
529-
ul > li:last-child > :last-child {
530-
margin-bottom: 0px;
526+
ol.simple ol p,
527+
ol.simple ul p,
528+
ul.simple ol p,
529+
ul.simple ul p {
530+
margin-top: 0;
531531
}
532532

533-
ol ol > li:last-child > :last-child,
534-
ol ul > li:last-child > :last-child,
535-
ul ol > li:last-child > :last-child,
536-
ul ul > li:last-child > :last-child {
537-
margin-bottom: revert;
533+
ol.simple > li:not(:first-child) > p,
534+
ul.simple > li:not(:first-child) > p {
535+
margin-top: 0;
536+
}
537+
538+
ol.simple p,
539+
ul.simple p {
540+
margin-bottom: 0;
538541
}
539542

540543
dl.footnote > dt,

0 commit comments

Comments
 (0)