mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-30 17:04:28 +00:00
59fd0cd5dc
All colors used in Minerva are converted from Less variables into CSS custom properties. A new file called CSSCustomProperties.less is created in the skins.minerva.base.styles module to store these custom properties and an ADR is provided on the rationale for dropping support for browsers that don't support custom properties. The new CSS custom properties follow Codex design token conventions where possible (and noted when not). Link colors are unique because their styles are defined in core, so in that case the Less variables values are set to custom properties. Those values are then fed back into MediaWiki core for core link styling. Also adds a temporary night-mode color palette under the .skin-nightmode-1 class on the <html> element. Bug: T356074 Change-Id: Ida1f14138f12bd3c600c264bde7b5100f9dbf4ff
56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
/* stylelint-disable selector-max-id */
|
|
@import 'mediawiki.skin.variables.less';
|
|
|
|
/**
|
|
* Mixin based on Vector mixin
|
|
* https://github.com/wikimedia/mediawiki-skins-Vector/blob/master/skinStyles/ext.echo.styles.badge.less
|
|
* Used in desktop version of Minerva.
|
|
*/
|
|
.mixin-notification-badge() {
|
|
position: relative;
|
|
|
|
// When 99+ allow counter so spill outside icon
|
|
&.cdx-button {
|
|
overflow: visible;
|
|
}
|
|
|
|
&::after {
|
|
position: absolute;
|
|
left: 55%;
|
|
top: 43%;
|
|
font-size: 0.75rem;
|
|
padding: 0.25rem;
|
|
border: 1px solid #fff;
|
|
border-radius: @border-radius-base;
|
|
background-color: #72777d;
|
|
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;
|
|
}
|
|
}
|
|
|
|
.minerva-icon--bell {
|
|
.cdx-mixin-css-icon( @cdx-icon-bell, var(--color-subtle) );
|
|
}
|
|
|
|
.minerva-icon--tray {
|
|
.cdx-mixin-css-icon( @cdx-icon-tray, var(--color-subtle) );
|
|
}
|
|
|
|
.mw-echo-notification-badge-nojs {
|
|
.mixin-notification-badge();
|
|
}
|
|
|
|
// Special colors for unseen notifications (Applies to desktop Minerva)
|
|
#pt-notifications-alert.mw-echo-unseen-notifications::after {
|
|
background-color: @color-destructive;
|
|
}
|
|
|
|
#pt-notifications-notice.mw-echo-unseen-notifications::after {
|
|
background-color: @color-progressive;
|
|
}
|