Skip to content

Commit 90463f0

Browse files
Blendifybenjaoming
andauthored
Fix readthedocs#1078: Citation not styled properly (readthedocs#1080)
* Fix readthedocs#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 readthedocs#1078: Citation not styled properly readthedocs#1080" Co-authored-by: Benjamin Bach <[email protected]>
1 parent e741681 commit 90463f0

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

docs/demo/demo.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,15 @@ Footnotes
264264
Citations
265265
---------
266266

267-
.. [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.
267+
.. [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.
268268
269269
.. [12] This citation has some ``code blocks`` in it, maybe some **bold** and
270270
*italics* too. Heck, lets put a link to a meta citation [13]_ too.
271271
272272
.. [13] This citation will have two backlinks.
273273
274274
275-
Here's a reference to the above, [12]_, and a [nonexistent]_ citation.
276-
277-
Here is another type of citation: `citation`
275+
Here's a reference to the above, [Citation]_, and a [nonexistent]_ citation.
278276

279277
Glossary
280278
--------

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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,7 @@
304304
vertical-align: top
305305
// HTML5 writer
306306
html.writer-html5 &
307-
dl.footnote,
308-
dl.field-list
307+
dl.footnote, dl.citation, dl.field-list
309308
display: grid
310309
grid-template-columns: max-content auto
311310
> dt
@@ -314,8 +313,8 @@
314313
content: ":"
315314
> dt, > dd
316315
margin-bottom: 0rem
317-
dl.footnote
318-
font-size: 0.9rem
316+
dl.footnote, dl.citation
317+
font-size: .9rem
319318
> dt
320319
margin: 0rem 0.5rem 0.5rem 0rem
321320
line-height: 1.2rem
@@ -339,7 +338,7 @@
339338
font-size: 0.9rem
340339
// Both
341340
html.writer-html4 & table.docutils.citation, table.docutils.footnote,
342-
html.writer-html5 & dl.footnote
341+
html.writer-html5 & dl.footnote, dl.citation
343342
color: $text-medium
344343
code
345344
color: $gray
@@ -429,7 +428,7 @@
429428
> table:last-child
430429
margin-bottom: 0
431430
html.writer-html4 & dl:not(.docutils),
432-
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
431+
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)
433432
margin-bottom: $base-line-height
434433
> dt
435434
display: table

0 commit comments

Comments
 (0)