Debian Codegraph @

skins/MinervaNeue/includes/Skins/ToggleList/DropdownList.less

raw
1 // A DropdownList is a ToggleList that extends downward.
2
3 .toggle-list__list--drop-down {
4 background: @background-color-base;
5 // The menu appears over the content and occupies no room within it.
6 position: absolute;
7 // If max-height is set and the height exceeds it, add a vertical scrollbar.
8 overflow-y: auto;
9 // The menu floats over content but below overlays.
10 z-index: @z-index-drawer;
11 // Two box-shadows: first creates a drop-shadow, second acts as a subtle border.
12 box-shadow: 0 5px 17px 0 rgba( 0, 0, 0, 0.24 ), 0 0 1px @border-color-base;
13 visibility: hidden;
14 opacity: 0;
15 transform: translateY( -8px );
16
17 // When cursor is pointer and -webkit-tap-highlight-color is set, the color does not seem to
18 // transition. Clear it.
19 -webkit-tap-highlight-color: transparent;
20
21 .toggle-list-item:hover {
22 // Make the app feel like an app, not a JPEG. When hovering over a menu item, add a little
23 // interactivity.
24 background: @background-color-interactive;
25 }
26 }
27
28 // Without the minerva-animations-ready class, DropdownList can appear and
29 // perform its exit animation when the page loads in chrome (and possibly
30 // others).
31 // https://bugs.chromium.org/p/chromium/issues/detail?id=332189
32 .minerva-animations-ready {
33 .toggle-list__list--drop-down {
34 // Animate menu visibility, opacity, and translation changes in and out. Visibility duration
35 // cannot be animated initially as it causes a flash on page load in Chromium due to
36 // https://bugs.chromium.org/p/chromium/issues/detail?id=332189.
37 transition: opacity @transition-duration-base ease-in-out, -webkit-tap-highlight-color 0s ease-in-out, transform @transition-duration-base ease-in-out, visibility @transition-duration-base ease-in-out;
38 }
39 }
40
41 .toggle-list__checkbox:checked ~ .toggle-list__list--drop-down {
42 transform: translateY( 0 );
43 // Reveal the list when checked.
44 visibility: visible;
45 opacity: 1;
46 }