Skip to content

Commit

Permalink
Fix #1078: Citation not styled properly (#1080)
Browse files Browse the repository at this point in the history
* Fix #1078: Citation not styled properly

Turns out our demo docs werent being rendered by sphinx as citations so this may have slipped though the sphinx 2 fixes.

I updated the demo docs and included the need style fixes.

* Group citations and footnotes

* Build Assets

* Build theme.css with "Fix #1078: Citation not styled properly #1080"

Co-authored-by: Benjamin Bach <benjamin@overtag.dk>
  • Loading branch information
Blendify and benjaoming committed Aug 26, 2022
1 parent e741681 commit 90463f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
6 changes: 2 additions & 4 deletions docs/demo/demo.rst
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
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

0 comments on commit 90463f0

Please sign in to comment.