From 8a39fef52f41bae7fe034cee67656952246af529 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Tue, 13 Nov 2018 17:02:26 -0800 Subject: [PATCH] Wrap the "bytes changed" indication on Special:Contributions with CSS Rather than use actual text, move the parentheses that serve as presentation into the CSS. Bug: T205581 Change-Id: I4ae645ca0edf0001a20c228f90f8d43a10cfff71 --- includes/changes/ChangesList.php | 3 ++- resources/src/mediawiki.special.changeslist.less | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index fea31b46d6..b1dff14924 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -351,12 +351,13 @@ class ChangesList extends ContextSource { } else { $formattedSizeClass = 'mw-plusminus-neg'; } + $formattedSizeClass .= ' mw-diff-bytes'; $formattedTotalSize = $context->msg( 'rc-change-size-new' )->numParams( $new )->text(); return Html::element( $tag, [ 'dir' => 'ltr', 'class' => $formattedSizeClass, 'title' => $formattedTotalSize ], - $context->msg( 'parentheses', $formattedSize )->plain() ) . $lang->getDirMark(); + $formattedSize ) . $lang->getDirMark(); } /** diff --git a/resources/src/mediawiki.special.changeslist.less b/resources/src/mediawiki.special.changeslist.less index 3785ff817c..4c089e5c6e 100644 --- a/resources/src/mediawiki.special.changeslist.less +++ b/resources/src/mediawiki.special.changeslist.less @@ -67,15 +67,18 @@ content: '. .'; } -.mw-changeslist-links { - display: inline-block; - +.mw-changeslist-links, +.mw-diff-bytes { &:before { content: '@{msg-parentheses-start}'; } &:after { content: '@{msg-parentheses-end}'; } +} + +.mw-changeslist-links { + display: inline-block; > span:not( :first-child ):before { content: '@{msg-pipe-separator}'; -- 2.20.1