浏览代码

Utilities/Sphinx: Add hanging indent to version notes

Tweak HTML styling of version-{added,changed} notes to include a hanging
indent. This makes it more obvious what text is part of such a note in
cases where the note is lengthy (especially if more than one paragraph),
rather than the relevant text blending into the surrounding prose.
Matthew Woehlke 2 年之前
父节点
当前提交
038f4c12e3
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      Utilities/Sphinx/static/cmake.css

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

@@ -45,6 +45,17 @@ div.sphinxsidebarwrapper {
   white-space: nowrap;
   white-space: nowrap;
 }
 }
 
 
+/* Add hanging indent to version-{added,changed} content. */
+div .versionadded > *,
+div .versionchanged > * {
+  padding-left: 2em;
+}
+
+div.versionadded > :first-child,
+div.versionchanged > :first-child {
+  text-indent: -2em;
+}
+
 /* Remove unwanted margin in case list item contains a div-wrapping
 /* Remove unwanted margin in case list item contains a div-wrapping
    directive like `.. versionadded` or `.. deprecated`. */
    directive like `.. versionadded` or `.. deprecated`. */
 dd > :first-child > p {
 dd > :first-child > p {