Debian Codegraph @

extensions/Cite/modules/parsoid-styles/ext.cite.parsoid.styles.less

raw
1 /* CSS for Parsoid Cite extension */
2
3 @import 'ext.cite.parsoid.counter-style.less';
4
5 :root {
6 --cite-backlink-separator: '.';
7 --cite-counter-style: decimal;
8 }
9
10 /* Parsoid HTML emits <sup> tags for follows uses even though there is
11 * no visible output for follows. Parsoid does this to ensure it can
12 * roundtrip back the source wikitext after edits.
13 * However, since this HTML should not be rendered, we use CSS to hide it */
14 .mw-ref-follow {
15 display: none;
16 }
17
18 /* Style for linkbacks from <references> to <ref>s */
19 ol.mw-references {
20 /**
21 * Resetting *any* counter on an <ol> element messes up the built-in numbering in Firefox.
22 * Explicitly resetting the built-in "list-item" counter fixes this.
23 *
24 * We have 2 counters for Parsoid HTML for different functionality.
25 * Make sure both are reset!
26 *
27 * NOTE: This rule is a duplicate of the one present in ext.cite.styles.less
28 * but duplicating it here ensures no matter how the rules and files are
29 * refactored and which rule ends up applying on the loaded doc, both
30 * counters continue to be incremented. As of now, the rule in ext.cite.styles.less
31 * is the one that seems to be winning.
32 **/
33 counter-reset: mw-ref-extends-parent mw-references list-item;
34
35 > li {
36 /**
37 * We have 2 counters for Parsoid HTML for different functionality.
38 * Make sure both are incremented!
39 *
40 * NOTE: This rule is a duplicate of the one present in ext.cite.styles.less
41 * but duplicating it here ensures no matter how the rules and files are
42 * refactored and which rule ends up applying on the loaded doc, both
43 * counters continue to be incremented. As of now, the rule in ext.cite.styles.less
44 * is the one that seems to be winning.
45 **/
46 counter-increment: mw-ref-extends-parent mw-references;
47 }
48 }
49
50 [ rel~='mw:referencedBy' ]::before {
51 content: '↑ ';
52 }
53
54 span[ rel~='mw:referencedBy' ] {
55 counter-reset: mw-ref-linkback -1;
56
57 a::before {
58 counter-increment: mw-ref-linkback;
59 line-height: 1;
60 vertical-align: super; /* <sup> use in Cite */
61 font-size: smaller; /* <sup> use in Cite */
62 }
63
64 a::after {
65 content: ' '; /* default separator outside <sup> */
66 line-height: 1;
67 }
68
69 a:last-child::after {
70 content: '';
71 }
72 }
73
74 /* Hide the default rendering in browsers that support content
75 * generation by selecting for ::after pseudo-element. */
76 /* stylelint-disable-next-line selector-type-no-unknown */
77 x-thereisnoelementwiththisname[ rel='mw:referencedBy' ]::before,
78 span.mw-linkback-text {
79 display: none;
80 }
81
82 /* Previously, MediaWiki styled the warning class.
83 * It no longer does this, so style cite warnings through mw-ext-cite-warning. */
84 .mw-ext-cite-warning {
85 font-size: larger;
86 color: #ac6600;
87 }