Skip to content

Commit 433958e

Browse files
authored
Infra: Increase spacing between complex list items (#3662)
1 parent 248999f commit 433958e

File tree

1 file changed

+21
-0
lines changed
  • pep_sphinx_extensions/pep_theme/static

1 file changed

+21
-0
lines changed

pep_sphinx_extensions/pep_theme/static/style.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ section#pep-page-section {
7474
padding: 0.25rem;
7575
}
7676

77+
/* This is likely very close to the browser default, but we make it a variable
78+
* so it can be used in other rules. */
79+
:root {
80+
--paragraph-margin-vertical: 1em;
81+
}
82+
p {
83+
margin: var(--paragraph-margin-vertical) 0;
84+
}
85+
7786
/* Header rules */
7887
h1 {
7988
font-size: 2rem;
@@ -197,6 +206,18 @@ ol.upperalpha {list-style: upper-alpha}
197206
ol.lowerroman {list-style: lower-roman}
198207
ol.upperroman {list-style: upper-roman}
199208

209+
/* We can't express this as a single rule using `not(.simple)`, because when a
210+
* simple list is nested inside another simple list, the inner list is not given
211+
* a class. So instead we use two rules, one more specific than the other. */
212+
#pep-content ol li,
213+
#pep-content ul li {
214+
margin: var(--paragraph-margin-vertical) 0;
215+
}
216+
#pep-content ol.simple li,
217+
#pep-content ul.simple li {
218+
margin: 0 0;
219+
}
220+
200221
/* Maths rules */
201222
sub,
202223
sup {

0 commit comments

Comments
 (0)