dropdown.less
1.28 KB
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
/**
* This is an adoptation of Bootstrap's dropdown.
*/
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: 5px solid;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
}
.dropdown {
position: relative;
touch-action: manipulation;
&--inline {
display: inline-block;
}
}
.dropdown-toggle {
cursor: pointer;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin-top: 2px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 1px 2px;
overflow: hidden;
text-align: left;
&--full {
min-width: 100%;
}
li > a {
display: block;
padding: 7px 13px;
clear: both;
white-space: nowrap;
color: #333;
&:hover {
background: #eee;
}
}
> .active > a {
background-color: #ccc;
}
}
.open {
> .dropdown-menu {
display: block;
}
}
// Backdrop to catch body clicks on mobile, etc.
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: (@zindex-dropdown - 10);
}