mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-16 18:58:45 +00:00
111757970e
As Stephen pointed out somewhere, this is a bit of a micro-optimisation Let's simplify this code by always rendering it in the HTML. MainMenu.js as a result becomes a controller that just decides when to show it. The geolocation check for Nearby is removed given the fact that all grade A browsers for mediawiki have Geolocation support Additional changes * Browser support suggests "animations" class is redundant now * `open` event no longer filed - not being used anywhere * Transparent shield is now managed by the MainMenu controller not the skin (which was confusing) * Test geolocation using a simple feature tests rather than abstracting it away inside Browser * The main menu button is always hidden under either a translucent shield and/or the main menu itself when it has been opened so so it's not possible to ever click it while the menu is open - the click handler is thus simplified removing a check for the class of the button Depends-On: I7fd243366cceae780bd46e1aef2c08dae073f647 Change-Id: I3892afb5ed3df628e2845043cf3bbc22a9928921
81 lines
1.5 KiB
Plaintext
81 lines
1.5 KiB
Plaintext
@import '../../minerva.less/minerva.variables.less';
|
|
@import '../../minerva.less/minerva.mixins.less';
|
|
@import 'mediawiki.mixins.animation';
|
|
|
|
@animationDuration: 0.3s;
|
|
|
|
// transparent-shield class can be removed when removed from MobileFrontend Skin.js
|
|
.transparent-shield,
|
|
.mw-mf-page-center__mask {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
opacity: 0;
|
|
bottom: 0;
|
|
background: @semiTransparent;
|
|
z-index: @z-indexAboveContent;
|
|
// don't use display: none because it's not animatable
|
|
visibility: hidden;
|
|
.transition( opacity 0.25s ease-in-out );
|
|
}
|
|
|
|
.navigation-enabled {
|
|
// transparent-shield class can be removed when removed from MobileFrontend Skin.js
|
|
.transparent-shield,
|
|
.mw-mf-page-center__mask {
|
|
visibility: visible;
|
|
opacity: 0.5;
|
|
}
|
|
}
|
|
|
|
// Flip the arrow in table of contents when toggled
|
|
.toctogglecheckbox:checked ~ .toctitle .mw-ui-icon:last-child {
|
|
&:before {
|
|
.transform( rotate( -180deg ) );
|
|
}
|
|
}
|
|
|
|
// Last modified bar styles
|
|
.last-modified-bar {
|
|
&.active {
|
|
background-color: @lastModifiedBarActiveBackgroundColor;
|
|
color: #fff;
|
|
|
|
a {
|
|
color: #fff;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Used by last modified and Main Menu items
|
|
.truncated-text {
|
|
.truncated-text();
|
|
}
|
|
|
|
@-webkit-keyframes fadeInImage {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes fadeInImage {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
// When the image has loaded transition background color and image opacity
|
|
// for a fade-in effect
|
|
img.image-lazy-loaded {
|
|
.animation( fadeInImage @animationDuration ease-in );
|
|
}
|