mediawiki-skins-Vector/skinStyles/ext.echo.styles.badge.less
Umherirrender f3dfc9df1e build: Updating npm dependencies
* stylelint-config-wikimedia: 0.13.0 → 0.14.0

Run stylelint fix to fix the new stylelint rule

Change-Id: I3f9e528ca9f8292a9e3630356f0e8bf5df5f6609
2023-03-28 22:22:36 +02:00

55 lines
1.2 KiB
Plaintext

@import '../resources/common/variables.less';
.mixin-notification-badge() {
// When 99+ allow counter so spill outside icon
// Overrides mw-ui-icon default.
&.mw-ui-icon {
overflow: visible;
}
&::after {
position: absolute;
left: 55%;
top: 43%;
font-size: unit( 12 / @font-size-browser, em );
padding: 7px 0.3em;
border: 1px solid #fff;
border-radius: @border-radius-base;
background-color: @colorGray7;
content: attr( data-counter-text );
color: #fff;
}
// The number of notifications shouldn't show if there are none.
&[ data-counter-num='0' ]::after {
content: none;
}
}
.mw-echo-notification-badge-nojs {
.mixin-notification-badge();
}
// Special colors for unseen notifications
#pt-notifications-alert .mw-echo-unseen-notifications::after {
background-color: @color-destructive;
}
#pt-notifications-notice .mw-echo-unseen-notifications::after {
background-color: @color-primary;
}
// Override ULS enhanced buttons
#pt-notifications-notice .mw-echo-notifications-badge,
#pt-notifications-alert .mw-echo-notifications-badge {
.mixin-notification-badge();
margin: 0;
line-height: 0;
opacity: 1;
&:focus {
// Copied from mixins.buttons.less, match button focus styles
box-shadow: @box-shadow-primary--focus;
}
}