-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
editor.scss
42 lines (38 loc) · 1.08 KB
/
editor.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.wp-block-navigation-submenu {
display: block;
.wp-block-navigation__submenu-container {
z-index: 28;
}
// Show on editor selected, even if on frontend it only stays open on focus-within.
&.is-selected,
&.has-child-selected {
> .wp-block-navigation__submenu-container {
// We use important here because if the parent block is selected and submenus are present, they should always be visible.
visibility: visible !important;
opacity: 1 !important;
min-width: 200px !important;
height: auto !important;
width: auto !important;
// These styles are needed to display the dropdown properly when it is empty.
position: absolute;
left: -1px; // Border width.
top: 100%;
@include break-medium {
.wp-block-navigation__submenu-container {
left: 100%;
top: -1px; // Border width.
// Prevent the menu from disappearing when the mouse is over the gap
&::before {
content: "";
position: absolute;
right: 100%;
height: 100%;
display: block;
width: 0.5em;
background: transparent;
}
}
}
}
}
}