Undo use of .reference instead of .mw-ref in CSS counter rules

When these styles are loaded on a normal MediaWiki page containing
output from the old parser, they cause references to be duplicated.
Use .mw-ref for now, which is only present in Parsoid output.

This partially reverts d6705eb3f8.

Bug: T323343
Change-Id: I6f2d43a060bea7aa175bed80f1be2c3d8a4924b0
This commit is contained in:
Bartosz Dziewoński 2022-11-18 14:46:35 +01:00
parent 14bb8d8fa1
commit 731b162d4e
5 changed files with 19 additions and 19 deletions

View file

@ -8,41 +8,41 @@
/* stylelint-disable value-keyword-case */
/* With a group set */
.reference a[ data-mw-group ]:after {
.mw-ref a[ data-mw-group ]:after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, decimal ) ']';
}
/* Groups with special appearance */
.reference a[ data-mw-group='decimal' ]:after {
.mw-ref a[ data-mw-group='decimal' ]:after {
content: '[' counter( mw-Ref, decimal ) ']';
}
.reference a[ data-mw-group='lower-alpha' ]:after {
.mw-ref a[ data-mw-group='lower-alpha' ]:after {
content: '[' counter( mw-Ref, lower-alpha ) ']';
}
.reference a[ data-mw-group='upper-alpha' ]:after {
.mw-ref a[ data-mw-group='upper-alpha' ]:after {
content: '[' counter( mw-Ref, upper-alpha ) ']';
}
.reference a[ data-mw-group='lower-greek' ]:after {
.mw-ref a[ data-mw-group='lower-greek' ]:after {
content: '[' counter( mw-Ref, lower-greek ) ']';
}
.reference a[ data-mw-group='lower-roman' ]:after {
.mw-ref a[ data-mw-group='lower-roman' ]:after {
content: '[' counter( mw-Ref, lower-roman ) ']';
}
.reference a[ data-mw-group='upper-roman' ]:after {
.mw-ref a[ data-mw-group='upper-roman' ]:after {
content: '[' counter( mw-Ref, upper-roman ) ']';
}
.reference a[ data-mw-group='error-test' ]:after {
.mw-ref a[ data-mw-group='error-test' ]:after {
content: '[' counter( mw-Ref, symbols( cyclic 'first' 'second' 'last!' ) ) ']';
}
/* Without a group */
.reference a:after {
.mw-ref a:after {
content: '[' counter( mw-Ref, decimal ) ']';
}

View file

@ -1,16 +1,16 @@
/* Spanish (These styles favor wikipedia usage. Other projects may need overrides if they care.) */
/* <ref>s with a group */
.reference a[ data-mw-group ]:after {
.mw-ref a[ data-mw-group ]:after {
content: attr( data-mw-group ) ' ' counter( mw-Ref, decimal );
}
.reference a[ data-mw-group='decimal' ]:after {
.mw-ref a[ data-mw-group='decimal' ]:after {
content: counter( mw-Ref, decimal );
}
/* <ref>s without a group */
.reference a {
.mw-ref a {
white-space: nowrap;
/* There is a &#8203; after a <sup> in MediaWiki:Cite_reference_link on eswiki.
* Mediawiki:Common.css also has a sup.reference { margin-right: 0.6ch }.
@ -19,7 +19,7 @@
margin-left: 0.6ch;
}
.reference a:after {
.mw-ref a:after {
content: counter( mw-Ref, decimal );
}

View file

@ -1,12 +1,12 @@
/* French (These styles favor wikipedia usage. Other projects may need overrides if they care.) */
/* <ref>s with a group */
.reference a[ data-mw-group ]:after {
.mw-ref a[ data-mw-group ]:after {
content: attr( data-mw-group ) ' ' counter( mw-Ref, decimal );
}
/* <ref>s without a group */
.reference a:after {
.mw-ref a:after {
content: counter( mw-Ref, decimal );
}

View file

@ -1,12 +1,12 @@
/* Kannada (These styles favor wikipedia usage. Other projects may need overrides if they care.) */
/* <ref>s with a group */
.reference a[ data-mw-group ]:after {
.mw-ref a[ data-mw-group ]:after {
content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, kannada ) ']';
}
/* <ref>s without a group */
.reference a:after {
.mw-ref a:after {
content: '[' counter( mw-Ref, kannada ) ']';
}

View file

@ -1,11 +1,11 @@
/* Swedish (These styles favor wikipedia usage. Other projects may need overrides if they care.) */
.reference {
.mw-ref {
line-height: 0;
}
/* <ref>s with a group */
.reference a[ data-mw-group ]:after {
.mw-ref a[ data-mw-group ]:after {
content: '[' counter( mw-Ref, lower-alpha ) ']';
}