From 2f020163ee751a04ab3f337bc84ec43921a1feef Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Thu, 29 Oct 2020 09:00:31 -0700 Subject: [PATCH] Restore old Echo styling through several reverts These dont work. Timeless provides its own skinStyles for this module: * Revert "Timeless skinStyles should be additive not replace" This reverts commit 98d0d296a820758682083993460fa392bdc7684c. * Revert "Use skinStyles for deciding where the text-indent should apply" This reverts commit 8adab785479397612f026c1f863dbb6ab44bfd29. A new implementation in Vector means these are redundant: * Revert "Item label can now use overflow hidden" This reverts commit b5dd7baa083cc0983fb2a321da87a2b157c9a3bb. * Revert "Drop text indent in modern Vector" This reverts commit 150fc7a16c4ea62a1f434ed2d37a18620c79d1d6. Bug: T264339 Depends-On: I2afc12504d7184583fa8331479125474c68017dc Change-Id: Ifd0dd5a0479588664b772fb839dbbcd8d7c47320 --- extension.json | 3 --- includes/EchoHooks.php | 2 -- modules/nojs/mw.echo.badge.less | 18 +++--------------- modules/nojs/mw.echo.badge.monobook.less | 1 - modules/nojs/mw.echo.badge.timeless.less | 3 --- 5 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 modules/nojs/mw.echo.badge.timeless.less diff --git a/extension.json b/extension.json index b2a0d166f..ad022e1d8 100644 --- a/extension.json +++ b/extension.json @@ -347,9 +347,6 @@ "nojs/mw.echo.badge.less" ], "skinStyles": { - "+timeless": [ - "nojs/mw.echo.badge.timeless.less" - ], "minerva": [ "nojs/mw.echo.badge.minerva.less" ], diff --git a/includes/EchoHooks.php b/includes/EchoHooks.php index 52f66f3c0..81c3da91f 100644 --- a/includes/EchoHooks.php +++ b/includes/EchoHooks.php @@ -1103,7 +1103,6 @@ class EchoHooks implements RecentChange_saveHook { 'text' => $alertText, 'active' => ( $url == $title->getLocalURL() ), 'class' => $alertLinkClasses, - 'text-wrapper' => 'span', 'data' => [ 'counter-num' => $alertCount, 'counter-text' => $alertFormattedCount, @@ -1119,7 +1118,6 @@ class EchoHooks implements RecentChange_saveHook { 'text' => $msgText, 'active' => ( $url == $title->getLocalURL() ), 'class' => $msgLinkClasses, - 'text-wrapper' => 'span', 'data' => [ 'counter-num' => $msgCount, 'counter-text' => $msgFormattedCount, diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less index a384fcac9..87a8b5070 100644 --- a/modules/nojs/mw.echo.badge.less +++ b/modules/nojs/mw.echo.badge.less @@ -11,9 +11,10 @@ width: 20px; height: 20px; margin: 0 2px; - background-repeat: no-repeat; - background-position: center center; + // Hide the text, but keep accessible for screen-readers + // Later we put the counter back onscreen with a zero text-indent top: -5px; + text-indent: -9999px; border-radius: @border-radius-base; cursor: pointer; text-decoration: none; @@ -75,12 +76,6 @@ visibility: hidden; } } - - span { - overflow: hidden; - width: 100%; - display: inline-block; - } } &.oo-ui-flaggedElement-unseen, @@ -94,11 +89,4 @@ } } } - -/* vector */ -.skin-vector-legacy .mw-echo-notifications-badge { - // Hide the text, but keep accessible for screen-readers - // Later we put the counter back onscreen with a zero text-indent - text-indent: -9999px; -} /* stylelint-enable no-descending-specificity */ diff --git a/modules/nojs/mw.echo.badge.monobook.less b/modules/nojs/mw.echo.badge.monobook.less index 1d5983863..93eec98e1 100644 --- a/modules/nojs/mw.echo.badge.monobook.less +++ b/modules/nojs/mw.echo.badge.monobook.less @@ -6,7 +6,6 @@ background-size: 16px 16px; background-repeat: no-repeat; top: -1px; - text-indent: -9999px; &:after { top: 6px; diff --git a/modules/nojs/mw.echo.badge.timeless.less b/modules/nojs/mw.echo.badge.timeless.less deleted file mode 100644 index 2fd01c549..000000000 --- a/modules/nojs/mw.echo.badge.timeless.less +++ /dev/null @@ -1,3 +0,0 @@ -.mw-echo-notifications-badge { - text-indent: -9999px; -}