Merge "[refactor] finish abstracting the parsoid language style overrides"

This commit is contained in:
jenkins-bot 2024-07-22 17:25:17 +00:00 committed by Gerrit Code Review
commit 809e713ade
35 changed files with 129 additions and 353 deletions

View file

@ -0,0 +1,23 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, var( --cite-counter-style ) ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, var( --cite-counter-style ) ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, var( --cite-counter-style ) ) var( --cite-backlink-separator ) counter( mw-ref-linkback, var( --cite-counter-style ) );
}
/* Upstream bug in stylelint makes it complain aboout the case of 'mw-Ref' */
.mw-ref > a[ style~='mw-Ref' ] {
/* Hide the default rendering in browsers that support content
* generation by selecting for :after pseudo-element. */
/* stylelint-disable-next-line selector-type-no-unknown */
x-thereisnoelementwiththisname::after,
span.mw-reflink-text {
display: none;
}
}

View file

@ -1,5 +1,12 @@
/* CSS for Parsoid Cite extension */
@import 'ext.cite.parsoid.counter-style.less';
:root {
--cite-backlink-separator: '.';
--cite-counter-style: decimal;
}
/* 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.
@ -8,28 +15,6 @@
display: none;
}
/* Upstream bug in stylelint makes it complain aboout the case of 'mw-Ref' */
.mw-ref > a[ style~='mw-Ref' ] {
/* With a group set */
&[ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, decimal ) ']';
}
/* Without a group */
&::after {
content: '[' counter( mw-Ref, decimal ) ']';
}
/* Hide the default rendering in browsers that support content
* generation by selecting for :after pseudo-element. */
/* stylelint-disable-next-line selector-type-no-unknown */
x-thereisnoelementwiththisname::after,
span.mw-reflink-text {
display: none;
}
}
/* Style for linkbacks from <references> to <ref>s */
ol.mw-references {
/**
@ -71,7 +56,6 @@ span[ rel~='mw:referencedBy' ] {
a::before {
counter-increment: mw-ref-linkback;
content: counter( mw-references, decimal ) '.' counter( mw-ref-linkback, decimal );
line-height: 1;
vertical-align: super; /* <sup> use in Cite */
font-size: smaller; /* <sup> use in Cite */

View file

@ -1,13 +1,6 @@
@import 'ext.cite.parsoid.rtl.less';
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, arabic-indic ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, arabic-indic ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, arabic-indic ) '٫' counter( mw-ref-linkback, arabic-indic );
:root {
--cite-backlink-separator: '٫';
--cite-counter-style: arabic-indic;
}

View file

@ -1,13 +1,6 @@
@import 'ext.cite.parsoid.rtl.less';
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, arabic-indic ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, arabic-indic ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, arabic-indic ) ',' counter( mw-ref-linkback, arabic-indic );
:root {
--cite-backlink-separator: ',';
--cite-counter-style: arabic-indic;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, bengali ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, bengali ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, bengali ) '.' counter( mw-ref-linkback, bengali );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: bengali;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, devanagari ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: devanagari;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, bengali ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, bengali ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, bengali ) '.' counter( mw-ref-linkback, bengali );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: bengali;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, tibetan ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, tibetan ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, tibetan ) '.' counter( mw-ref-linkback, tibetan );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: tibetan;
}

View file

@ -1,13 +1,6 @@
@import 'ext.cite.parsoid.rtl.less';
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, arabic-indic ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, arabic-indic ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, arabic-indic ) '٫' counter( mw-ref-linkback, arabic-indic );
:root {
--cite-backlink-separator: '٫';
--cite-counter-style: arabic-indic;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, tibetan ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, tibetan ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, tibetan ) '.' counter( mw-ref-linkback, tibetan );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: tibetan;
}

View file

@ -1,13 +1,6 @@
@import 'ext.cite.parsoid.rtl.less';
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, persian ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, persian ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, persian ) '٫' counter( mw-ref-linkback, persian );
:root {
--cite-backlink-separator: '٫';
--cite-counter-style: persian;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, gujarati ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, gujarati ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, gujarati ) '.' counter( mw-ref-linkback, gujarati );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: gujarati;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, devanagari ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: devanagari;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, persian ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, persian ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, persian ) '٫' counter( mw-ref-linkback, persian );
:root {
--cite-backlink-separator: '٫';
--cite-counter-style: persian;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, khmer ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, khmer ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, khmer ) ',' counter( mw-ref-linkback, khmer );
:root {
--cite-backlink-separator: ',';
--cite-counter-style: khmer;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, kannada ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, kannada ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, kannada ) '.' counter( mw-ref-linkback, kannada );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: kannada;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, arabic-indic ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, arabic-indic ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, arabic-indic ) '٫' counter( mw-ref-linkback, arabic-indic );
:root {
--cite-backlink-separator: '٫';
--cite-counter-style: arabic-indic;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, devanagari ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: devanagari;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, arabic-indic ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, arabic-indic ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, arabic-indic ) '٫' counter( mw-ref-linkback, arabic-indic );
:root {
--cite-backlink-separator: '٫';
--cite-counter-style: arabic-indic;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, lao ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, lao ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, lao ) '.' counter( mw-ref-linkback, lao );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: lao;
}

View file

@ -3,14 +3,7 @@
symbols: '' '一' '二' '三' '四' '五' '六' '七' '八' '九';
}
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, lzh-counter ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, lzh-counter ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, lzh-counter ) '點' counter( mw-ref-linkback, lzh-counter );
:root {
--cite-backlink-separator: '點';
--cite-counter-style: lzh-counter;
}

View file

@ -3,14 +3,7 @@
symbols: '꯰' '꯱' '꯲' '꯳' '꯴' '꯵' '꯶' '꯷' '꯸' '꯹';
}
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, mni-counter ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, mni-counter ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, mni-counter ) '.' counter( mw-ref-linkback, mni-counter );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: mni-counter;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, devanagari ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: devanagari;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, myanmar ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, myanmar ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, myanmar ) '.' counter( mw-ref-linkback, myanmar );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: myanmar;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, devanagari ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: devanagari;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, devanagari ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: devanagari;
}

View file

@ -3,14 +3,7 @@
symbols: '᪀' '᪁' '᪂' '᪃' '᪄' '᪅' '᪆' '᪇' '᪈' '᪉';
}
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, nod-counter ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, nod-counter ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, nod-counter ) '.' counter( mw-ref-linkback, nod-counter );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: nod-counter;
}

View file

@ -5,14 +5,7 @@
symbols: '߀' '߁' '߂' '߃' '߄' '߅' '߆' '߇' '߈' '߉';
}
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, nqo-counter ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, nqo-counter ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, nqo-counter ) '.' counter( mw-ref-linkback, nqo-counter );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: nqo-counter;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, oriya ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, oriya ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, oriya ) '.' counter( mw-ref-linkback, oriya );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: oriya;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, devanagari ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, devanagari ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, devanagari ) '.' counter( mw-ref-linkback, devanagari );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: devanagari;
}

View file

@ -1,13 +1,6 @@
@import 'ext.cite.parsoid.rtl.less';
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, persian ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, persian ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, persian ) '.' counter( mw-ref-linkback, persian );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: persian;
}

View file

@ -1,13 +1,6 @@
@import 'ext.cite.parsoid.rtl.less';
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, persian ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, persian ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, persian ) '٫' counter( mw-ref-linkback, persian );
:root {
--cite-backlink-separator: '٫';
--cite-counter-style: persian;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, myanmar ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, myanmar ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, myanmar ) '.' counter( mw-ref-linkback, myanmar );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: myanmar;
}

View file

@ -3,14 +3,7 @@
symbols: '᱐' '᱑' '᱒' '᱓' '᱔' '᱕' '᱖' '᱗' '᱘' '᱙';
}
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, sat-counter ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, sat-counter ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, sat-counter ) '.' counter( mw-ref-linkback, sat-counter );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: sat-counter;
}

View file

@ -1,11 +1,4 @@
.mw-ref > a[ style~='mw-Ref' ]::after {
content: '[' counter( mw-Ref, arabic-indic ) ']';
}
.mw-ref > a[ style~='mw-Ref' ][ data-mw-group ]::after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, arabic-indic ) ']';
}
span[ rel='mw:referencedBy' ] > a::before {
content: counter( mw-references, arabic-indic ) '.' counter( mw-ref-linkback, arabic-indic );
:root {
--cite-backlink-separator: '.';
--cite-counter-style: arabic-indic;
}