-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdropdown-submenu-engine.less
100 lines (87 loc) · 1.85 KB
/
dropdown-submenu-engine.less
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
* Dropdown Submenu Plugin for jQuery
*
* @version 1.2
* https://www.carlesrever.com/dropdown-submenu-jquery
*
* Minimum engine styles required for working. You can use it with your own skin styles,
* enqueue all in your project, etc.
*
* You will find this styles plus engine styles in the dropdown-submenu-dist.css file.
*/
.dropdown-submenu-wrapper {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
.dropdown-field {
position: relative;
}
&.dropdown-submenu-open .dropdown-field {
z-index: 100000000;
}
&.is-hidden {
display: none;
}
ul, li {
list-style: none;
margin: 0;
padding: 0;
}
// Main menu
.dropdown-main-list {
position: absolute;
display: none;
}
&.dropdown-submenu-open .dropdown-main-list {
display: block;
}
.dropdown-main-item {
position: relative;
white-space: nowrap;
}
// Submenu
.dropdown-submenu {
position: absolute;
display: none;
left: 100%;
margin-left: -2px;
top: 0;
}
.dropdown-submenu-item {
white-space: nowrap;
}
// Mouse caret
.dropdown-has-childs {
cursor: default;
}
.dropdown-field-watch,
.dropdown-no-childs,
.dropdown-submenu-item {
cursor: pointer;
}
li:hover .dropdown-submenu {
display: block;
}
&.is-disabled .dropdown-field-watch {
cursor: default;
}
}
.dropdown-submenu-wrapper.fits-well {
.dropdown-submenu-hidden {
border: 0!important;
clip: rect(0 0 0 0)!important;
height: 1px!important;
margin: -1px!important;
overflow: hidden!important;
padding: 0!important;
position: absolute!important;
width: 1px!important;
}
}
.dropdown-submenu-wrapper.not-fit {
display: inline-block; // default browser value for selects
.dropdown-field {
display: none;
}
}