2019-08-01 20:35:10 +00:00
|
|
|
// Component of ui.less
|
2019-08-08 20:01:03 +00:00
|
|
|
@import '../../minerva.less/minerva.variables.less';
|
2019-08-01 20:35:10 +00:00
|
|
|
|
2019-11-26 05:02:40 +00:00
|
|
|
// stylelint-disable no-descending-specificity, selector-max-id
|
2019-08-01 20:35:10 +00:00
|
|
|
|
|
|
|
// .menu
|
|
|
|
#mw-mf-page-left {
|
2019-08-05 20:41:12 +00:00
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
min-width: 275px;
|
2019-12-18 19:23:09 +00:00
|
|
|
visibility: hidden;
|
2019-08-05 20:41:12 +00:00
|
|
|
|
|
|
|
@media screen and ( min-width: @width-breakpoint-tablet ) {
|
|
|
|
min-width: @width-breakpoint-mobile;
|
|
|
|
}
|
|
|
|
// It should always be possible to dismiss the menu by tapping outside of it.
|
|
|
|
max-width: 80%;
|
2024-01-31 15:06:56 +00:00
|
|
|
z-index: @z-index-drawer;
|
2019-08-01 20:35:10 +00:00
|
|
|
// Add vertical scrollbar as needed.
|
|
|
|
overflow-y: auto;
|
2023-04-09 13:49:29 +00:00
|
|
|
background-color: @background-color-light;
|
2022-05-16 16:55:54 +00:00
|
|
|
transform: translate( -100%, 0 );
|
2019-08-01 20:35:10 +00:00
|
|
|
|
|
|
|
ul {
|
|
|
|
padding-bottom: 22px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-18 19:23:09 +00:00
|
|
|
// TODO: combined with `.mw-mf-page-center__mask` & create a separate "masks" module.
|
|
|
|
.main-menu-mask {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
opacity: 0;
|
|
|
|
bottom: 0;
|
2024-01-31 15:06:56 +00:00
|
|
|
background: @opaque;
|
|
|
|
z-index: @z-index-above-content;
|
2019-12-18 19:23:09 +00:00
|
|
|
// don't use display: none because it's not animatable
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
#main-menu-input:checked ~ .main-menu-mask {
|
|
|
|
visibility: visible;
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
#main-menu-input:checked ~ #mw-mf-page-left {
|
|
|
|
visibility: visible;
|
2023-04-09 13:49:29 +00:00
|
|
|
box-shadow: 1px 0 8px 0 @box-shadow-color-drawer;
|
2022-05-16 16:55:54 +00:00
|
|
|
transform: translate( 0, 0 );
|
2019-12-18 19:23:09 +00:00
|
|
|
}
|
|
|
|
|
2020-01-07 21:27:29 +00:00
|
|
|
// Without the minerva-animations-ready class, the main menu can appear and
|
|
|
|
// perform its exit animation when the page loads in chrome (and possibly
|
|
|
|
// others).
|
|
|
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=332189
|
|
|
|
.minerva-animations-ready {
|
2019-12-18 19:23:09 +00:00
|
|
|
#mw-mf-page-left {
|
2022-05-16 16:55:54 +00:00
|
|
|
// Animate menu visibility, opacity, and translation changes in and out. Visibility duration
|
|
|
|
// cannot be animated initially as it causes a flash on page load in Chromium due to
|
|
|
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=332189.
|
|
|
|
transition: opacity @transition-duration-medium @transition-timing-function-menu, visibility @transition-duration-medium @transition-timing-function-menu, transform @transition-duration-medium @transition-timing-function-menu;
|
2019-12-18 19:23:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.main-menu-mask {
|
2022-05-16 16:55:54 +00:00
|
|
|
transition: opacity @transition-duration-base @transition-timing-function-menu, visibility 0ms linear @transition-duration-base;
|
2019-12-18 19:23:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#main-menu-input:checked ~ .main-menu-mask {
|
2022-05-16 16:55:54 +00:00
|
|
|
transition: opacity @transition-duration-base @transition-timing-function-menu;
|
2019-12-18 19:23:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-05 18:27:53 +00:00
|
|
|
// T264376 - disable animations on browsers impacted by bug
|
|
|
|
.hotfix-T264376 {
|
|
|
|
.main-menu-mask {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#main-menu-input:checked ~ .main-menu-mask {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-28 20:28:59 +00:00
|
|
|
// stylelint-enable no-descending-specificity, selector-max-id
|