mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
7f6f792a3a
Replacing 'mediawiki.ui/variables.less' `@import` with new skin-aware 'mediawiki.skin.variables.less' standard. Also replacing and removing scattered WikimediaUI Base v0.15.0 variables with new skin variables. Also - replacing several static values with new Codex design tokens featuring skin variables for following properties: - background-color - color - border-width, border-style, border-color and border shorthand - border-radius - box-shadow colors - outline-width, outline-style, outline-color and outline shorthand - opacity - replacing equal-value Echo variables with new skin variables - replacing `opacity: 0` with `opacity: 1px solid transparent`, which improves accessibility in Windows High Contrast mode Bump required MediaWiki core version to >= v1.41.0. Bug: T332541 Co-Authored-by: Volker E. <volker.e@wikimedia.org> Depends-On: I04f9e48a1cf9dee915cf51e1e12b17ff0a595a06 Change-Id: If3863f07d7c3a8b58808fb03401c1060a92bc2ab
93 lines
1.9 KiB
Plaintext
93 lines
1.9 KiB
Plaintext
@import 'mediawiki.skin.variables.less';
|
|
@import '../echo.variables.less';
|
|
|
|
/* stylelint-disable no-descending-specificity */
|
|
/* We have to include the #pt-notifications selector due to monobook */
|
|
.mw-echo-notifications-badge {
|
|
#pt-notifications-alert &,
|
|
#pt-notifications-notice & {
|
|
position: relative;
|
|
display: block;
|
|
box-sizing: border-box;
|
|
width: 20px;
|
|
height: 20px;
|
|
margin: 0 2px;
|
|
// Hide the text, but keep accessible for screen-readers
|
|
// Later we put the counter back onscreen with a zero text-indent
|
|
top: 0;
|
|
text-indent: -9999px;
|
|
border-radius: @border-radius-base;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
line-height: normal;
|
|
opacity: 0.87;
|
|
color: transparent;
|
|
|
|
&:hover,
|
|
&:active,
|
|
&:focus {
|
|
outline: @outline-base--focus;
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: 0 0 0 1px #fff, 0 0 0 3px #36c;
|
|
opacity: 1;
|
|
|
|
&::after {
|
|
border-color: @border-color-progressive--focus;
|
|
}
|
|
}
|
|
|
|
// Counter
|
|
&::after {
|
|
position: absolute;
|
|
display: inline-block;
|
|
cursor: pointer;
|
|
// Bring it back onscreen
|
|
top: 9px;
|
|
text-indent: 0;
|
|
left: 55%;
|
|
font-size: 0.9em;
|
|
font-weight: bold;
|
|
padding: 0 0.3em;
|
|
border: @border-width-base @border-style-base @border-color-inverted;
|
|
border-radius: @border-radius-base;
|
|
background-color: @badge-counter-background-seen;
|
|
content: attr( data-counter-text );
|
|
color: @color-inverted;
|
|
}
|
|
|
|
&-dimmed {
|
|
opacity: 0.4;
|
|
}
|
|
|
|
&.mw-echo-notifications-badge-long-label {
|
|
margin-right: 0.5em;
|
|
|
|
&::after {
|
|
left: 35%;
|
|
}
|
|
}
|
|
|
|
&.mw-echo-notifications-badge-all-read {
|
|
opacity: 0.51;
|
|
|
|
&::after {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.oo-ui-flaggedElement-unseen,
|
|
&.mw-echo-unseen-notifications {
|
|
#pt-notifications-alert &::after {
|
|
background-color: @background-color-destructive;
|
|
}
|
|
|
|
#pt-notifications-notice &::after {
|
|
background-color: @background-color-progressive;
|
|
}
|
|
}
|
|
}
|
|
/* stylelint-enable no-descending-specificity */
|