Skip to content

Commit 15fdfa1

Browse files
Blendifybenjaoming
andauthored
Fix definition lists inside api docs (readthedocs#1084)
* Fix definition lists inside api docs This is similar to readthedocs#1080 (and is needed to fix citations in the demo here) Fixes readthedocs#1052 * Build Assets * Build Assets 2 * New build of theme.css and theme.js * Regenerate theme.css for readthedocs#1084 Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
1 parent aeae4c1 commit 15fdfa1

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎docs/demo/test_py_module/test.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ class Foo:
1212
and etc, but those will *always* have the ``.descname`` or
1313
``.descclassname`` class.
1414
15+
Term
16+
It is also possible to include definitions inside docstrings.
17+
They should be styled as a normal definition list.
18+
19+
:Field List:
20+
It is also possible to include definitions inside docstrings.
21+
They should be styled as a normal definition list.
22+
23+
.. [1] A footnote contains body elements, consistently indented by at
24+
least 3 spaces.
25+
26+
.. [Citation] A citation contains body elements, consistently indented by at
27+
least 3 spaces.
28+
1529
Normal ``<tt>`` (like the <tt> I just wrote here) needs to be shown with
1630
the same style as anything else with ````this type of markup````.
1731

‎sphinx_rtd_theme/static/css/theme.css‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/sass/_theme_rst.sass‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@
452452
font-size: 100% !important
453453
// In the html4 writer, parameters is a table. In html5 writer, parameters
454454
// is a nested dl.field-list
455-
dl:not(.field-list) > dt
455+
dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) > dt
456456
margin-bottom: $base-line-height / 4
457457
border: none
458458
border-left: solid 3px hsl(0, 0%, 80%)

0 commit comments

Comments
 (0)