jenkins-bot has submitted this change and it was merged. Change subject: mw.echo.badge: Use 'color: transparent' rather than 'font-size: 0' to hide text ......................................................................
mw.echo.badge: Use 'color: transparent' rather than 'font-size: 0' to hide text It's a lot easier to set 'color' back to the desired value than 'font-size'. As an amusing side-effect, the hidden text will appear when selected, and it will be possible to copy it. Change-Id: I7a7ef8e60f514743c9cb65bcef3ba4e869f5b7b7 --- M modules/nojs/mw.echo.badge.less 1 file changed, 3 insertions(+), 10 deletions(-) Approvals: Catrope: Looks good to me, approved Mooeypoo: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less index e9dde42..3d082d4 100644 --- a/modules/nojs/mw.echo.badge.less +++ b/modules/nojs/mw.echo.badge.less @@ -10,9 +10,10 @@ width: 30px; height: 24px; top: -5px; - font-size: 0; cursor: pointer; text-decoration: none; + // Hide the text, but keep accessible for screen-readers + color: transparent; &:hover, &:active, @@ -46,15 +47,7 @@ cursor: pointer; top: 10px; left: 40%; - // The original font-size was 12px, we had - // to override it in the parent so the original - // number is hidden, so we rewrite it here. This - // is far from perfect, but it will make sure - // that screen-readers can still see the number that - // is outputted in the original <a> link while letting - // us style the boxed number the way we want to. - // We want 0.8em of the original 12px font size - font-size: 12px * 0.8; + font-size: 0.8em; font-weight: bold; padding: 0 0.3em; border: 1px solid white; -- To view, visit https://gerrit.wikimedia.org/r/303257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a7ef8e60f514743c9cb65bcef3ba4e869f5b7b7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Bartosz DziewoĆski <matma....@gmail.com> Gerrit-Reviewer: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Mooeypoo <mor...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits