2015-04-29 16:07:09 +00:00
|
|
|
/* CSS for Parsoid Cite extension */
|
|
|
|
|
2024-07-19 22:08:34 +00:00
|
|
|
@import 'ext.cite.parsoid.counter-style.less';
|
|
|
|
|
|
|
|
:root {
|
|
|
|
--cite-backlink-separator: '.';
|
|
|
|
--cite-counter-style: decimal;
|
|
|
|
}
|
|
|
|
|
2023-03-10 18:15:58 +00:00
|
|
|
/* Parsoid HTML emits <sup> tags for follows uses even though there is
|
|
|
|
* no visible output for follows. Parsoid does this to ensure it can
|
|
|
|
* roundtrip back the source wikitext after edits.
|
|
|
|
* However, since this HTML should not be rendered, we use CSS to hide it */
|
2020-12-01 19:28:01 +00:00
|
|
|
.mw-ref-follow {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2015-04-29 16:07:09 +00:00
|
|
|
/* Style for linkbacks from <references> to <ref>s */
|
|
|
|
ol.mw-references {
|
2022-12-16 21:42:17 +00:00
|
|
|
/**
|
|
|
|
* Resetting *any* counter on an <ol> element messes up the built-in numbering in Firefox.
|
|
|
|
* Explicitly resetting the built-in "list-item" counter fixes this.
|
|
|
|
*
|
|
|
|
* We have 2 counters for Parsoid HTML for different functionality.
|
|
|
|
* Make sure both are reset!
|
|
|
|
*
|
2024-01-21 14:38:12 +00:00
|
|
|
* NOTE: This rule is a duplicate of the one present in ext.cite.styles.less
|
2022-12-16 21:42:17 +00:00
|
|
|
* but duplicating it here ensures no matter how the rules and files are
|
|
|
|
* refactored and which rule ends up applying on the loaded doc, both
|
2024-01-21 14:38:12 +00:00
|
|
|
* counters continue to be incremented. As of now, the rule in ext.cite.styles.less
|
2022-12-16 21:42:17 +00:00
|
|
|
* is the one that seems to be winning.
|
|
|
|
**/
|
|
|
|
counter-reset: mw-ref-extends-parent mw-references list-item;
|
2015-04-29 16:07:09 +00:00
|
|
|
|
2024-01-21 14:59:20 +00:00
|
|
|
> li {
|
|
|
|
/**
|
|
|
|
* We have 2 counters for Parsoid HTML for different functionality.
|
|
|
|
* Make sure both are incremented!
|
|
|
|
*
|
|
|
|
* NOTE: This rule is a duplicate of the one present in ext.cite.styles.less
|
|
|
|
* but duplicating it here ensures no matter how the rules and files are
|
|
|
|
* refactored and which rule ends up applying on the loaded doc, both
|
|
|
|
* counters continue to be incremented. As of now, the rule in ext.cite.styles.less
|
|
|
|
* is the one that seems to be winning.
|
|
|
|
**/
|
|
|
|
counter-increment: mw-ref-extends-parent mw-references;
|
|
|
|
}
|
2015-04-29 16:07:09 +00:00
|
|
|
}
|
|
|
|
|
2023-02-15 15:06:40 +00:00
|
|
|
[ rel~='mw:referencedBy' ]::before {
|
2016-05-17 17:15:13 +00:00
|
|
|
content: '↑ ';
|
2015-04-29 16:07:09 +00:00
|
|
|
}
|
|
|
|
|
2022-11-01 21:34:55 +00:00
|
|
|
span[ rel~='mw:referencedBy' ] {
|
2023-02-08 00:28:26 +00:00
|
|
|
counter-reset: mw-ref-linkback -1;
|
2022-11-01 21:34:55 +00:00
|
|
|
|
2024-01-21 14:59:20 +00:00
|
|
|
a::before {
|
|
|
|
counter-increment: mw-ref-linkback;
|
|
|
|
line-height: 1;
|
|
|
|
vertical-align: super; /* <sup> use in Cite */
|
|
|
|
font-size: smaller; /* <sup> use in Cite */
|
|
|
|
}
|
2015-04-29 16:07:09 +00:00
|
|
|
|
2024-01-21 14:59:20 +00:00
|
|
|
a::after {
|
|
|
|
content: ' '; /* default separator outside <sup> */
|
|
|
|
line-height: 1;
|
|
|
|
}
|
2022-10-27 22:18:48 +00:00
|
|
|
|
2024-01-21 14:59:20 +00:00
|
|
|
a:last-child::after {
|
|
|
|
content: '';
|
|
|
|
}
|
2015-04-29 16:07:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Hide the default rendering in browsers that support content
|
2023-02-15 15:06:40 +00:00
|
|
|
* generation by selecting for ::after pseudo-element. */
|
2017-03-20 14:32:02 +00:00
|
|
|
/* stylelint-disable-next-line selector-type-no-unknown */
|
2023-02-15 15:06:40 +00:00
|
|
|
x-thereisnoelementwiththisname[ rel='mw:referencedBy' ]::before,
|
2016-05-17 17:15:13 +00:00
|
|
|
span.mw-linkback-text {
|
2015-04-29 16:07:09 +00:00
|
|
|
display: none;
|
|
|
|
}
|
2022-10-24 18:11:19 +00:00
|
|
|
|
|
|
|
/* Previously, MediaWiki styled the warning class.
|
|
|
|
* It no longer does this, so style cite warnings through mw-ext-cite-warning. */
|
|
|
|
.mw-ext-cite-warning {
|
|
|
|
font-size: larger;
|
|
|
|
color: #ac6600;
|
|
|
|
}
|