summaryrefslogtreecommitdiffstats
path: root/Utilities/Sphinx
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2023-03-14 18:39:44 (GMT)
committerMatthew Woehlke <matthew.woehlke@kitware.com>2023-03-14 18:39:44 (GMT)
commit038f4c12e32dcf5e1cc2d6341a98782cb9a7a6cc (patch)
treee8ce28a197a56b247f522cfc453d71b22adf0c5b /Utilities/Sphinx
parent797141606e838a2cfb79e0d079451484a3e2a750 (diff)
downloadCMake-038f4c12e32dcf5e1cc2d6341a98782cb9a7a6cc.zip
CMake-038f4c12e32dcf5e1cc2d6341a98782cb9a7a6cc.tar.gz
CMake-038f4c12e32dcf5e1cc2d6341a98782cb9a7a6cc.tar.bz2
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.
Diffstat (limited to 'Utilities/Sphinx')
-rw-r--r--Utilities/Sphinx/static/cmake.css11
1 files changed, 11 insertions, 0 deletions
diff --git a/Utilities/Sphinx/static/cmake.css b/Utilities/Sphinx/static/cmake.css
index 41a74f5..6303cb1 100644
--- a/Utilities/Sphinx/static/cmake.css
+++ b/Utilities/Sphinx/static/cmake.css
@@ -45,6 +45,17 @@ div.sphinxsidebarwrapper {
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
directive like `.. versionadded` or `.. deprecated`. */
dd > :first-child > p {