1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 19:08:07 +08:00

Help: Fix overlapping text in footnotes

In commit 038f4c12e3 (Utilities/Sphinx: Add hanging indent to version
notes, 2023-03-14, v3.27.0-rc1~322^2) we tweaked version notes to
improve readability. However, due to the way footnotes work, this
resulted in overlapping text elements when a footnote consists of a
version note. Adjust the styling to correct this issue.
This commit is contained in:
Matthew Woehlke
2025-04-21 15:40:08 -04:00
parent e14d9b0f42
commit 097d8fa7a5

View File

@@ -73,16 +73,19 @@ div.body nav.contents p {
white-space: nowrap;
}
/* Add hanging indent to deprecated and version-{added,changed} content. */
/* Add hanging indent to deprecated and version-{added,changed} content. Don't
de-indent footnotes, because the brackets are rendered as floating elements
that ignore the padding, while the de-indenting will cause the following
text to overlap the footnote brackets. */
div.deprecated > *,
div.versionadded > *,
div.versionchanged > * {
padding-left: 2em;
}
div.deprecated > :first-child,
div.versionadded > :first-child,
div.versionchanged > :first-child {
:not(.footnote) > div.deprecated > :first-child,
:not(.footnote) > div.versionadded > :first-child,
:not(.footnote) > div.versionchanged > :first-child {
text-indent: -2em;
}