| 1 |
@import 'mediawiki.skin.variables.less'; |
| 2 |
|
| 3 |
.mixin-notification-badge() { |
| 4 |
position: relative; |
| 5 |
background-position: center; |
| 6 |
background-repeat: no-repeat; |
| 7 |
|
| 8 |
// When 99+ allow counter so spill outside icon |
| 9 |
&.cdx-button { |
| 10 |
overflow: visible; |
| 11 |
} |
| 12 |
|
| 13 |
&::after { |
| 14 |
position: absolute; |
| 15 |
left: 55%; |
| 16 |
top: 43%; |
| 17 |
font-size: unit( ( 12 / 16 ) * @font-size-small, rem ); |
| 18 |
padding: 0 unit( ( 4 / 16 ) * @font-size-small, rem ); |
| 19 |
border: 1px solid #fff; |
| 20 |
border-radius: @border-radius-base; |
| 21 |
background-color: #72777d; |
| 22 |
content: attr( data-counter-text ); |
| 23 |
color: #fff; |
| 24 |
} |
| 25 |
|
| 26 |
// The number of notifications shouldn't show if there are none. |
| 27 |
&[ data-counter-num='0' ]::after { |
| 28 |
content: none; |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
.mw-echo-notification-badge-nojs { |
| 33 |
.mixin-notification-badge(); |
| 34 |
} |
| 35 |
|
| 36 |
// Special colors for unseen notifications |
| 37 |
#pt-notifications-alert .mw-echo-unseen-notifications::after { |
| 38 |
background-color: @color-destructive; |
| 39 |
} |
| 40 |
|
| 41 |
#pt-notifications-notice .mw-echo-unseen-notifications::after { |
| 42 |
background-color: @color-progressive; |
| 43 |
} |
| 44 |
|
| 45 |
// Override ULS enhanced buttons |
| 46 |
#pt-notifications-notice .mw-echo-notifications-badge, |
| 47 |
#pt-notifications-alert .mw-echo-notifications-badge { |
| 48 |
.mixin-notification-badge(); |
| 49 |
display: inline-flex; |
| 50 |
margin: 0; |
| 51 |
opacity: 1; |
| 52 |
// Workaround T343838. |
| 53 |
// The OOUI icon uses the ::after pseudo element so will not work with mask image. |
| 54 |
// Because of this we disable the mask image rule. |
| 55 |
/* stylelint-disable declaration-no-important */ |
| 56 |
-webkit-mask-image: none !important; |
| 57 |
mask-image: none !important; |
| 58 |
/* stylelint-enable declaration-no-important */ |
| 59 |
// T341490 We are incorrectly applying Codex icon and button styles on the |
| 60 |
// same element because ULS frequently overwrites the contents of the element |
| 61 |
// so it is too difficult to maintain the correct markup. Because we are mixing |
| 62 |
// Codex styles, the proper styles are overridden, this corrects that. |
| 63 |
min-width: @min-size-interactive-pointer; |
| 64 |
min-height: @min-size-interactive-pointer; |
| 65 |
} |