Debian Codegraph @

skins/MinervaNeue/resources/skins.minerva.mainMenu.styles/MainMenu.less

raw
1 // Component of ui.less
2 @import '../../minerva.less/minerva.variables.less';
3
4 // stylelint-disable no-descending-specificity, selector-max-id
5
6 // .menu
7 #mw-mf-page-left {
8 position: fixed;
9 top: 0;
10 left: 0;
11 bottom: 0;
12 min-width: 275px;
13 visibility: hidden;
14
15 @media screen and ( min-width: @min-width-breakpoint-tablet ) {
16 min-width: @min-width-breakpoint-mobile;
17 }
18 // It should always be possible to dismiss the menu by tapping outside of it.
19 max-width: 80%;
20 z-index: @z-index-drawer;
21 // Add vertical scrollbar as needed.
22 overflow-y: auto;
23 background-color: @background-color-interactive;
24 transform: translate( -100%, 0 );
25
26 ul {
27 padding-bottom: 22px;
28 }
29 }
30
31 // TODO: combined with `.mw-mf-page-center__mask` & create a separate "masks" module.
32 .main-menu-mask {
33 position: fixed;
34 top: 0;
35 left: 0;
36 right: 0;
37 opacity: 0;
38 bottom: 0;
39 background: @opaque;
40 z-index: @z-index-above-content;
41 // don't use display: none because it's not animatable
42 visibility: hidden;
43 }
44
45 #main-menu-input:checked ~ .main-menu-mask {
46 visibility: visible;
47 opacity: 0.5;
48 }
49
50 #main-menu-input:checked ~ #mw-mf-page-left {
51 visibility: visible;
52 box-shadow: @box-shadow-drop-medium;
53 transform: translate( 0, 0 );
54 }
55
56 // Without the minerva-animations-ready class, the main menu can appear and
57 // perform its exit animation when the page loads in chrome (and possibly
58 // others).
59 // https://bugs.chromium.org/p/chromium/issues/detail?id=332189
60 .minerva-animations-ready {
61 #mw-mf-page-left {
62 // Animate menu visibility, opacity, and translation changes in and out. Visibility duration
63 // cannot be animated initially as it causes a flash on page load in Chromium due to
64 // https://bugs.chromium.org/p/chromium/issues/detail?id=332189.
65 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;
66 }
67
68 .main-menu-mask {
69 transition: opacity @transition-duration-base @transition-timing-function-menu, visibility 0ms linear @transition-duration-base;
70 }
71
72 #main-menu-input:checked ~ .main-menu-mask {
73 transition: opacity @transition-duration-base @transition-timing-function-menu;
74 }
75 }
76
77 // T264376 - disable animations on browsers impacted by bug
78 .hotfix-T264376 {
79 .main-menu-mask {
80 display: none;
81 }
82
83 #main-menu-input:checked ~ .main-menu-mask {
84 display: block;
85 }
86 }
87
88 // stylelint-enable no-descending-specificity, selector-max-id