Handle icon only labels with Codex in Minerva

In Minerva icon only buttons reveal themselves at desktop
resolution, except for any buttons in the header.

Bug: T340262
Change-Id: Iba6c633164a615b96bf19d5fe8f202b925bcace9
This commit is contained in:
Jon Robson 2023-07-27 14:35:56 -07:00 committed by Jdlrobson
parent 31d959ea73
commit 6dad2802f3
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,26 @@
@import 'mediawiki.skin.variables.less';
// Never reveal the labels of icon only buttons in the header,
// article content (parser-output), IP masking banner,
// or MobileFrontend overlays.
.mw-temp-user-banner,
.mw-parser-output,
.overlay-header,
.minerva-header {
.cdx-button.cdx-button--icon-only {
span + span {
.mixin-screen-reader-text();
}
}
}
// On desktop reveal labels of icon-only buttons.
// This applies to page actions and other icon only buttons
// that are not scoped in the rule above.
@media all and ( max-width: @width-breakpoint-desktop ) {
.cdx-button.cdx-button--icon-only {
span + span {
.mixin-screen-reader-text();
}
}
}

View file

@ -1,6 +1,7 @@
@import '../../minerva.less/minerva.variables.less'; @import '../../minerva.less/minerva.variables.less';
@import '../../minerva.less/minerva.mixins.less'; @import '../../minerva.less/minerva.mixins.less';
@import 'mediawiki.mixins.less'; @import 'mediawiki.mixins.less';
@import 'icons.less';
/* stylelint-disable no-descending-specificity */ /* stylelint-disable no-descending-specificity */
html, html,