Debian Codegraph @

skins/MinervaNeue/skinStyles/ext.echo.styles.badge.less

raw
1 /* stylelint-disable selector-max-id */
2 @import 'mediawiki.skin.variables.less';
3
4 /**
5 * Mixin based on Vector mixin
6 * https://github.com/wikimedia/mediawiki-skins-Vector/blob/master/skinStyles/ext.echo.styles.badge.less
7 * Used in desktop version of Minerva.
8 */
9 .mixin-notification-badge() {
10 position: relative;
11
12 // When 99+ allow counter so spill outside icon
13 &.cdx-button {
14 overflow: visible;
15 }
16
17 &::after {
18 position: absolute;
19 left: 55%;
20 top: 43%;
21 font-size: 0.75rem;
22 padding: 0.25rem;
23 border: 1px solid #fff;
24 border-radius: @border-radius-base;
25 background-color: #72777d;
26 content: attr( data-counter-text );
27 color: #fff;
28 }
29
30 // The number of notifications shouldn't show if there are none.
31 &[ data-counter-num='0' ]::after {
32 content: none;
33 }
34 }
35
36 .minerva-icon.minerva-icon--bell {
37 .cdx-mixin-css-icon( @cdx-icon-bell, @color-subtle);
38 }
39
40 .minerva-icon.minerva-icon--tray {
41 .cdx-mixin-css-icon( @cdx-icon-tray, @color-subtle);
42 }
43
44 .mw-echo-notification-badge-nojs {
45 .mixin-notification-badge();
46 }
47
48 // Special colors for unseen notifications (Applies to desktop Minerva)
49 #pt-notifications-alert.mw-echo-unseen-notifications::after {
50 background-color: @color-destructive;
51 }
52
53 #pt-notifications-notice.mw-echo-unseen-notifications::after {
54 background-color: @color-progressive;
55 }