Help: Improve styling for versionadded/deprecated directives

Sphinx theme CSS removes top margin for dd > p combination,
but directives add an intervening div and need a separate rule.

Issue: #19715
This commit is contained in:
Nikita Nemkin 2020-12-01 16:06:19 +05:00
parent 6ae216daef
commit dafcef8b50

View File

@ -16,3 +16,9 @@ div.sphinxsidebarwrapper {
.literal-block a.reference.internal {
background-color: #dfdfdf;
}
/* Remove unwanted margin in case list item contains a div-wrapping
directive like `.. versionadded` or `.. deprecated`. */
dd > :first-child > p {
margin-top: 0px;
}