Skip to content

Commit 17d51de

Browse files
authored
Merge pull request #1197 from readthedocs/nienn/fix-dl-double-margins
Fix #1196: Add CSS rule to remove double margins inside dl's
2 parents 4efbdbc + 0f76e9b commit 17d51de

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

docs/demo/test_py_module/test.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def add(self, val1, val2):
6565
:type val2: int
6666
:rtype: int
6767
68+
The parameters of this method are described in the parameter list.
6869
"""
6970

7071
return val1 + val2
@@ -111,3 +112,23 @@ def another_function(self, a, b, **kwargs):
111112
This is deprecated since 3.0
112113
"""
113114
return sum(kwargs.values()) / len(kwargs), a + b
115+
116+
117+
def add_numbers(a: int, b: int = 0) -> int:
118+
"""Add two numbers together
119+
120+
:param a: The first number
121+
:param b: The second number
122+
123+
Here is some more text.
124+
"""
125+
return a + b
126+
127+
128+
def subtract_numbers(a: int, b: int = 0) -> int:
129+
"""Subtract two numbers
130+
131+
:param a: The first number
132+
:param b: The second number
133+
"""
134+
return a - b

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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,11 @@
423423
dd
424424
margin: 0 0 ($base-line-height / 2) $base-line-height
425425
line-height: $base-line-height
426+
> p:last-child,
427+
> ol:last-child,
428+
> ul:last-child,
429+
> table:last-child
430+
margin-bottom: 0
426431
html.writer-html4 & dl:not(.docutils),
427432
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
428433
margin-bottom: $base-line-height

0 commit comments

Comments
 (0)