Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1196: Add CSS rule to remove double margins inside dl's #1197

Merged
merged 5 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/demo/test_py_module/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def add(self, val1, val2):
:type val2: int
:rtype: int

The parameters of this method are described in the parameter list.
"""

return val1 + val2
Expand Down Expand Up @@ -111,3 +112,23 @@ def another_function(self, a, b, **kwargs):
This is deprecated since 3.0
"""
return sum(kwargs.values()) / len(kwargs), a + b


def add_numbers(a: int, b: int = 0) -> int:
"""Add two numbers together

:param a: The first number
:param b: The second number

Here is some more text.
"""
return a + b


def subtract_numbers(a: int, b: int = 0) -> int:
"""Subtract two numbers

:param a: The first number
:param b: The second number
"""
return a - b
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/sass/_theme_rst.sass
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@
dd
margin: 0 0 ($base-line-height / 2) $base-line-height
line-height: $base-line-height
> p:last-child,
> ol:last-child,
> ul:last-child,
> table:last-child
margin-bottom: 0
html.writer-html4 & dl:not(.docutils),
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
margin-bottom: $base-line-height
Expand Down