mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-16 18:58:45 +00:00
725ee88657
* .mw-notification-tag-toast appears to not longer exist anywhere in mediawiki * Removed bottom 'counter translate' style. I'm not sure this is needed now? The comment makes it seem like it was needed for older browsers that didn't support fixed positioning but I think mobile browser support for fixed is good now [1] * The previous animated class was only in effect during the exit of toasts. I refactored this logic to be easier to read with hopefully the same animation effect. [1] https://caniuse.com/#feat=css-fixed Bug: T234570 Change-Id: I757122758cb0758f9ede5ccb81d9cc82bb92e79b
71 lines
1.9 KiB
Plaintext
71 lines
1.9 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: @toastNotificationColor;
|
|
color: #fff;
|
|
margin: 0 10% 20px;
|
|
width: 80%;
|
|
text-align: center;
|
|
border-radius: @borderRadius;
|
|
|
|
// 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>
|
|
//
|
|
// Styleguide 3.2.
|
|
&.mw-notification-type-error {
|
|
// FIXME: Use `mobile.startup.images` to serve this file.
|
|
// Styling icon with the class mw-notification-type-error
|
|
// allows extensions ot use mw.notify( msg, 'error' ) and have those styled as errors.
|
|
// see https://github.com/search?l=JavaScript&q=org%3Awikimedia+mw.notify&type=Code
|
|
.background-image( 'images/error.svg' );
|
|
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
|
|
}
|
|
|
|
a {
|
|
color: @skinContentBgColor;
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
.mw-notification-area {
|
|
z-index: @z-indexOverOverlay;
|
|
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 ) );
|
|
}
|
|
}
|