From 731b162d4e11538c4e667b08c3da8d2d0a470210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 18 Nov 2022 14:46:35 +0100 Subject: [PATCH] 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 d6705eb3f8437d8ae1e4f9b4355c0fa6721cd17a. Bug: T323343 Change-Id: I6f2d43a060bea7aa175bed80f1be2c3d8a4924b0 --- modules/ext.cite.style.css | 18 +++++++++--------- modules/ext.cite.style.es.css | 8 ++++---- modules/ext.cite.style.fr.css | 4 ++-- modules/ext.cite.style.kn.css | 4 ++-- modules/ext.cite.style.sv.css | 4 ++-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/modules/ext.cite.style.css b/modules/ext.cite.style.css index a0bbf9520..e2c144594 100644 --- a/modules/ext.cite.style.css +++ b/modules/ext.cite.style.css @@ -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 ) ']'; } diff --git a/modules/ext.cite.style.es.css b/modules/ext.cite.style.es.css index 5eb5badc4..630b6018d 100644 --- a/modules/ext.cite.style.es.css +++ b/modules/ext.cite.style.es.css @@ -1,16 +1,16 @@ /* Spanish (These styles favor wikipedia usage. Other projects may need overrides if they care.) */ /* 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 ); } /* s without a group */ -.reference a { +.mw-ref a { white-space: nowrap; /* There is a ​ after a 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 ); } diff --git a/modules/ext.cite.style.fr.css b/modules/ext.cite.style.fr.css index 9817b4f92..8b9b74fa4 100644 --- a/modules/ext.cite.style.fr.css +++ b/modules/ext.cite.style.fr.css @@ -1,12 +1,12 @@ /* French (These styles favor wikipedia usage. Other projects may need overrides if they care.) */ /* 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 ); } /* s without a group */ -.reference a:after { +.mw-ref a:after { content: counter( mw-Ref, decimal ); } diff --git a/modules/ext.cite.style.kn.css b/modules/ext.cite.style.kn.css index 5f83aa749..552bac345 100644 --- a/modules/ext.cite.style.kn.css +++ b/modules/ext.cite.style.kn.css @@ -1,12 +1,12 @@ /* Kannada (These styles favor wikipedia usage. Other projects may need overrides if they care.) */ /* 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 ) ']'; } /* s without a group */ -.reference a:after { +.mw-ref a:after { content: '[' counter( mw-Ref, kannada ) ']'; } diff --git a/modules/ext.cite.style.sv.css b/modules/ext.cite.style.sv.css index 4a0fdd2e3..a53601d53 100644 --- a/modules/ext.cite.style.sv.css +++ b/modules/ext.cite.style.sv.css @@ -1,11 +1,11 @@ /* Swedish (These styles favor wikipedia usage. Other projects may need overrides if they care.) */ -.reference { +.mw-ref { line-height: 0; } /* s with a group */ -.reference a[ data-mw-group ]:after { +.mw-ref a[ data-mw-group ]:after { content: '[' counter( mw-Ref, lower-alpha ) ']'; }