forked from KirkMcDonald/kirkmcdonald.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dropdown.css
82 lines (82 loc) · 1.87 KB
/
dropdown.css
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
/* dropdowns */
.dropdownWrapper {
display: inline-block;
}
.dropdownWrapper .dropdown {
border: 2px solid var(--light);
border-radius: 5px;
background-color: var(--dark);
overflow: hidden;
display: inline-block;
vertical-align: middle;
cursor: pointer;
-moz-user-select: none;
}
.dropdownWrapper.open .dropdown {
border-color: var(--accent);
padding: 0.4em;
position: absolute;
z-index: 10;
transition: height 0.1s;
height: auto;
width: auto;
cursor: default;
}
.dropdownWrapper .clicker {
display: none;
}
.dropdownWrapper.open .clicker {
display: block;
position: fixed;
width: 100%;
height: 100%;
z-index: 5;
top: 0px;
left: 0px;
cursor: default;
}
.dropdownWrapper .dropdown:hover {
border-color: var(--accent);
}
.dropdownWrapper .spacer {
display: none;
}
.dropdownWrapper.open .spacer {
border: 2px solid transparent;
margin: 2px;
display: inline-block;
vertical-align: middle;
}
.dropdownWrapper .dropdown br, .dropdownWrapper .dropdown hr {
display: none;
}
.dropdownWrapper.open .dropdown br {
display: inline;
}
.dropdownWrapper.open .dropdown hr {
display: block;
border-color: var(--accent);
border-style: solid;
}
.dropdownWrapper .dropdown input[type="radio"] {
display: none;
}
.dropdownWrapper .dropdown input[type="radio"] + label {
border-radius: 5px;
display: none;
margin: 2px;
}
.dropdownWrapper.open .dropdown input[type="radio"] + label {
display: inline-block;
}
.dropdownWrapper .dropdown input[type="radio"] + label:hover {
background-color: var(--light);
}
.dropdownWrapper .dropdown input[type="radio"]:checked + label {
display: inline-block;
pointer-events: none;
}
.dropdownWrapper.open .dropdown input[type="radio"]:checked + label {
background-color: var(--light);
pointer-events: auto;
}