mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
basic CSS: better handling of list margins, including "simple" lists
Fixes #7838.
This commit is contained in:
parent
0051992ba5
commit
82768d8cff
@ -513,33 +513,30 @@ ol.upperroman {
|
|||||||
list-style: upper-roman;
|
list-style: upper-roman;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol > li:first-child > :first-child,
|
:not(li) > ol > li:first-child > :first-child,
|
||||||
ul > li:first-child > :first-child {
|
:not(li) > ul > li:first-child > :first-child {
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol ol > li:first-child > :first-child,
|
:not(li) > ol > li:last-child > :last-child,
|
||||||
ol ul > li:first-child > :first-child,
|
:not(li) > ul > li:last-child > :last-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 {
|
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol ol > li:last-child > :last-child,
|
ol.simple ol p,
|
||||||
ol ul > li:last-child > :last-child,
|
ol.simple ul p,
|
||||||
ul ol > li:last-child > :last-child,
|
ul.simple ol p,
|
||||||
ul ul > li:last-child > :last-child {
|
ul.simple ul p {
|
||||||
margin-bottom: revert;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol.simple > li > p,
|
ol.simple > li:not(:first-child) > p,
|
||||||
ul.simple > li > p {
|
ul.simple > li:not(:first-child) > p {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol.simple p,
|
||||||
|
ul.simple p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user