mediawiki-skins-MinervaNeue/skinStyles/mobile.startup/toast.less
Jan Drewniak 59fd0cd5dc Convert all color related Less variables to CSS custom properties
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
2024-02-02 17:57:27 +00:00

68 lines
1.6 KiB
Plaintext

@import '../../minerva.less/minerva.variables.less';
@import '../../minerva.less/minerva.mixins.less';
.mw-notification,
.toast {
font-size: @font-size-minerva-small;
padding: 0.9em 1em;
background-color: @background-color-toast-notification;
color: var( --color-inverted );
margin: 0 10% 20px;
width: 80%;
text-align: center;
border-radius: @border-radius-base;
// Toast notification error state
//
// When the toast message needs to convey that an error has occurred add the error class
//
// Markup:
// <div class="toast visible error">
// An error occurred.
// </div>
&.mw-notification-type-error {
background-size: 24px;
background-position: 16px 50%;
background-repeat: no-repeat;
padding-left: 5%;
width: 75%;
border: 0; // FIXME: this is needed because a global .error adds border
}
.oo-ui-iconElement-icon {
// Fix icon placement in post-edit notifications (T336001)
display: block;
}
a {
color: var( --color-inverted );
text-decoration: underline;
}
}
.mw-notification-area {
z-index: @z-index-over-overlay;
position: fixed;
bottom: 0;
width: 100%;
}
.mw-notification,
.drawer {
display: block;
visibility: hidden;
/* we can't determine the actual size of the drawer in CSS, so this is
* an estimate; it doesn't have to be exact because it's used only for
* the sliding animation, not for hiding the drawer */
transform: translate( 0, 100px );
bottom: 0;
opacity: 0;
transition: transform @transition-duration-medium, opacity @transition-duration-medium, visibility @transition-duration-medium;
&.visible, &.mw-notification-visible {
visibility: visible;
opacity: 1;
transform: translate( 0, 0 );
}
}