소스 검색

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
Nikita Nemkin 4 년 전
부모
커밋
dafcef8b50
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      Utilities/Sphinx/static/cmake.css

+ 6 - 0
Utilities/Sphinx/static/cmake.css

@@ -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;
+}