You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 7, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: runestone/common/css/runestone-custom-sphinx-bootstrap.css
+93-8Lines changed: 93 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -208,7 +208,7 @@ a {
208
208
margin:03px;
209
209
border-left:1px solid #f2f2f2;
210
210
}
211
-
211
+
212
212
.navbar-fixed-top .container {
213
213
padding:0;
214
214
}
@@ -456,6 +456,92 @@ h2 {
456
456
font-weight: normal;
457
457
}
458
458
459
+
/*
460
+
Missing brackets
461
+
================
462
+
The default styling from Sphinx's ``basic.css`` doesn't style multiple references to the same reference with brackets. Here's the relevant snippet of CSS:
However, there's no (current) CSS selector that will add a ``content`` to the multiply-referenced footnote without adding an additional ``content`` to the typical footnote: we want to select ``dt.label > span.brackets > text-only content`` or ``dt.label > span.brackets > :not(:has a)`` (see the unsupported `:has selector <https://css-tricks.com/did-you-know-about-the-has-css-selector/>`_. So, I see no solution for this (outside JS).
514
+
515
+
516
+
Incorrect color
517
+
===============
518
+
Second, the Bootstrap theme (v3.4.1) contains the following CSS, from ``node_modules/bootstrap/dist/css/less/labels.less``:
519
+
520
+
.. code-block:: CSS
521
+
:number-lines:
522
+
523
+
.label {
524
+
display: inline;
525
+
padding: .2em .6em .3em;
526
+
font-size: 75%;
527
+
font-weight: 700;
528
+
line-height: 1;
529
+
color: @label-color;
530
+
text-align: center;
531
+
white-space: nowrap;
532
+
vertical-align: baseline;
533
+
border-radius: .25em;
534
+
535
+
...more here omitted...
536
+
}
537
+
538
+
ALL this therefore gets applied to footnotes, since they have the ``label`` class. Because the ``@label-color`` is white, this CSS makes the reference invisible against the default (light mode) white background. I like the rest of the styling changes (even though they differ from the standard Sphinx settings), so only the color is changed.
539
+
*/
540
+
dt.label>span.brackets:not(span.brackets>a),
541
+
dt.label>span.fn-backref:not(span.fn-backref>a) {
542
+
color: black;
543
+
}
544
+
459
545
/* These admonition styles styles are copied from the Bootstrap .alert classes.
460
546
Most of the !important declarations are to override the Sphinx basic.css styles */
0 commit comments