diff options
author | Matthias Geier <Matthias.Geier@gmail.com> | 2020-06-20 00:12:41 +0300 |
---|---|---|
committer | Matthias Geier <Matthias.Geier@gmail.com> | 2020-06-20 21:35:50 +0300 |
commit | 82768d8cffe46646db46a4b8baf73435888e2ffc (patch) | |
tree | b684aae634698a557cd07f1c0636fee0a2db51c8 /sphinx/themes | |
parent | 0051992ba514186473363fadd5ceaa496c276a60 (diff) |
basic CSS: better handling of list margins, including "simple" lists
Fixes #7838.
Diffstat (limited to 'sphinx/themes')
-rw-r--r-- | sphinx/themes/basic/static/basic.css_t | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 5345a9840..e0f24c8a1 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -513,33 +513,30 @@ ol.upperroman { list-style: upper-roman; } -ol > li:first-child > :first-child, -ul > li:first-child > :first-child { +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { margin-top: 0px; } -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 { +:not(li) > ol > li:last-child > :last-child, +:not(li) > 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; +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; } -ol.simple > li > p, -ul.simple > li > p { +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { margin-top: 0; +} + +ol.simple p, +ul.simple p { margin-bottom: 0; } |