2019-08-08 20:01:03 +00:00
|
|
|
@import '../../minerva.less/minerva.variables.less';
|
|
|
|
@import '../../minerva.less/minerva.mixins.less';
|
2017-07-12 15:12:40 +00:00
|
|
|
|
|
|
|
.mw-notification,
|
|
|
|
.toast {
|
2019-07-31 17:59:52 +00:00
|
|
|
font-size: @font-size-minerva-small;
|
2017-07-12 15:12:40 +00:00
|
|
|
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' );
|
2019-04-03 02:16:46 +00:00
|
|
|
background-size: 24px;
|
2017-07-12 15:12:40 +00:00
|
|
|
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 {
|
2019-07-31 23:28:27 +00:00
|
|
|
color: @skinContentBgColor;
|
|
|
|
text-decoration: underline;
|
2017-07-12 15:12:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-notification-area {
|
|
|
|
z-index: @z-indexOverOverlay;
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.animations {
|
|
|
|
.mw-notification,
|
|
|
|
.drawer {
|
|
|
|
@duration: 0.25s;
|
|
|
|
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 ) );
|
|
|
|
// counter translate with bottom to avoid empty blank space at the bottom
|
|
|
|
// especially on browsers that don't support position: fixed
|
|
|
|
bottom: 100px;
|
|
|
|
opacity: 0;
|
|
|
|
|
|
|
|
// Only apply the transition when an animation is needed (when drawer/toast hidden/shown)
|
|
|
|
&.animated, &.mw-notification-tag-toast {
|
|
|
|
// delay visibility transition to make other transitions visible
|
|
|
|
// http://fvsch.com/code/transition-fade/test5.html
|
|
|
|
// need to assign to a temporary variable to preserve commas
|
|
|
|
// https://github.com/leafo/lessphp/issues/105#issuecomment-2872598
|
|
|
|
@transition: @duration, opacity @duration, visibility 0s @duration, bottom 0s @duration;
|
|
|
|
.transition-transform( @transition );
|
|
|
|
}
|
|
|
|
|
|
|
|
&.visible, &.mw-notification-visible {
|
|
|
|
bottom: 0;
|
|
|
|
// need to assign to a temporary variable to preserve commas
|
|
|
|
// https://github.com/leafo/lessphp/issues/105#issuecomment-2872598
|
|
|
|
@transition: @duration, opacity @duration;
|
|
|
|
.transition-transform( @transition );
|
|
|
|
visibility: visible;
|
|
|
|
opacity: 1;
|
|
|
|
.transform( translate( 0, 0 ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|