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 #1078: Citation not styled properly #1080

Merged
merged 9 commits into from
Aug 26, 2022
6 changes: 2 additions & 4 deletions docs/demo/demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,15 @@ Footnotes
Citations
---------

.. [11] This is the citation I made, let's make this extremely long so that we can tell that it doesn't follow the normal responsive table stuff.
.. [Citation] This is the citation I made, let's make this extremely long so that we can tell that it doesn't follow the normal responsive table stuff.

.. [12] This citation has some ``code blocks`` in it, maybe some **bold** and
*italics* too. Heck, lets put a link to a meta citation [13]_ too.

.. [13] This citation will have two backlinks.


Here's a reference to the above, [12]_, and a [nonexistent]_ citation.

Here is another type of citation: `citation`
Here's a reference to the above, [Citation]_, and a [nonexistent]_ citation.

Glossary
--------
Expand Down
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions src/sass/_theme_rst.sass
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@
vertical-align: top
// HTML5 writer
html.writer-html5 &
dl.footnote,
dl.field-list
dl.footnote, dl.citation, dl.field-list
display: grid
grid-template-columns: max-content auto
> dt
Expand All @@ -314,8 +313,8 @@
content: ":"
> dt, > dd
margin-bottom: 0rem
dl.footnote
font-size: 0.9rem
dl.footnote, dl.citation
font-size: .9rem
> dt
margin: 0rem 0.5rem 0.5rem 0rem
line-height: 1.2rem
Expand All @@ -339,7 +338,7 @@
font-size: 0.9rem
// Both
html.writer-html4 & table.docutils.citation, table.docutils.footnote,
html.writer-html5 & dl.footnote
html.writer-html5 & dl.footnote, dl.citation
color: $text-medium
code
color: $gray
Expand Down Expand Up @@ -429,7 +428,7 @@
> 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)
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)
margin-bottom: $base-line-height
> dt
display: table
Expand Down