docs(source): Add emphasis to the first line of docstrings¶
Description¶
Abstract¶
Make the first line of docstrings (of packages, modules, classes, methods and functions) bold and italic.
Motivation¶
The more important part, at first sight, of a docstring is the first line, but it was not visible enough.
Rationale¶
N/A
Info¶
- Hash
cc73cb6a0c55f3bc5012a1226ec780cdd906fa62
- Date
2020-09-25 23:37:34 +0200
- Parents
docs: Hide “View page source” links [158f5927] — 2020-09-25 23:37:12 +0200
- Children
style: Prefix `id_is_positive_integer` with `validate_` [a307cce6] — 2020-09-25 23:37:35 +0200
- Branches
- Tags
(No tags)
Changes¶
docs/_static/css/custom.css¶
- Type
Modified
- Stats
+15 -0
@@ -36,6 +36,21 @@ p.rubric.package-sub + .toctree-wrapper {
margin-left: 6px;
padding-top: 6px;
}
+/* Add emphasis to the first line of docstring of packages and modules */
+.package-or-module-title + .section > span.target:first-of-type + p, /* package with no content */
+.package-or-module-title + .section > span + h1:first-of-type + p, /* package with content */
+.package-or-module-title ~ span.target:first-of-type + p { /* module */
+ font-weight: 600;
+ font-style: italic;
+ font-size: larger;
+}
+/* Add emphasis to the first line of docstring of classes, methods and functions */
+dl.class > dd:first-of-type > p:nth-child(2),
+dl.method > dd:first-of-type > p:first-of-type,
+dl.function > dd:first-of-type > p:first-of-type {
+ font-weight: 600;
+ font-style: italic;
+}
/* Handle more levels of entries in the left sidebar */
.wy-menu-vertical li.toctree-l3.current li.toctree-l4>ul,