Wrap the "bytes changed" indication on Special:Contributions with CSS
authorjdlrobson <jdlrobson@gmail.com>
Wed, 14 Nov 2018 01:02:26 +0000 (17:02 -0800)
committerVolkerE <volker.e@wikimedia.org>
Fri, 16 Nov 2018 00:30:44 +0000 (00:30 +0000)
Rather than use actual text, move the parentheses that serve as
presentation into the CSS.

Bug: T205581
Change-Id: I4ae645ca0edf0001a20c228f90f8d43a10cfff71

includes/changes/ChangesList.php
resources/src/mediawiki.special.changeslist.less

index fea31b4..b1dff14 100644 (file)
@@ -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();
        }
 
        /**
index 3785ff8..4c089e5 100644 (file)
        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}';