diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2023-02-24 20:01:14 (GMT) |
---|---|---|
committer | Matthew Woehlke <matthew.woehlke@kitware.com> | 2023-03-03 22:05:02 (GMT) |
commit | 74e3c1d313616b5faf83ff423c8e8ef3f2010a41 (patch) | |
tree | 7f24ecc7db552a3e658a742848cdc0f408c06c7a /Utilities/Sphinx/static | |
parent | c09b7604841448b0c949e5c98ea791c9dc9d477e (diff) | |
download | CMake-74e3c1d313616b5faf83ff423c8e8ef3f2010a41.zip CMake-74e3c1d313616b5faf83ff423c8e8ef3f2010a41.tar.gz CMake-74e3c1d313616b5faf83ff423c8e8ef3f2010a41.tar.bz2 |
Utilities/Sphinx: Add a directive to document command signatures
Add a `signature` directive to offer a CMake version of Sphinx's
`function` directive, similar to that found in other domains (py, cpp,
etc.). Like others, this takes one or more signatures as arguments and
creates dt/dd nodes from the signatures and the directive contents.
Diffstat (limited to 'Utilities/Sphinx/static')
-rw-r--r-- | Utilities/Sphinx/static/cmake.css | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Utilities/Sphinx/static/cmake.css b/Utilities/Sphinx/static/cmake.css index 324cd92..dd0dd02 100644 --- a/Utilities/Sphinx/static/cmake.css +++ b/Utilities/Sphinx/static/cmake.css @@ -17,6 +17,29 @@ div.sphinxsidebarwrapper { background-color: #dfdfdf; } +/* Apply <pre> style (from classic.css) to signature directive argument. */ +.signature .sig { + padding: 5px; + background-color: #eeeeee; + color: #333333; + line-height: 120%; + border: 1px solid #ac9; + border-left: none; + border-right: none; +} + +/* Add additional styling to signature directive argument. */ +.signature .sig { + margin-bottom: 5px; + padding-left: calc(5px + 3em); + text-indent: -3em; + font-family: monospace; +} + +.signature .sig .code.sig-name { + font-weight: normal; +} + /* Remove unwanted margin in case list item contains a div-wrapping directive like `.. versionadded` or `.. deprecated`. */ dd > :first-child > p { |