forked from Robdel12/DropKick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdropkick.scss
226 lines (209 loc) · 4.65 KB
/
dropkick.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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/**
* Default DropKick theme
*
* Feel free to edit the default theme
* or even add your own.
*
* See the readme for themeing help
*
*/
//***** Begin Theme, feel free to edit in here! ******
// One container to bind them...
.dk_container {
background-color: #f5f5f5;
font-family: 'Helvetica', Arial, sans-serif;
font-size: 12px;
font-weight: bold;
margin-bottom: 18px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
&:focus {
outline: 0;
}
a {
cursor: pointer;
text-decoration: none;
}
}
// Opens the dropdown and holds the menu label
.dk_toggle {
border: 1px solid #ccc;
color: #333;
padding: 7px 45px 7px 10px;
text-shadow: #fff 1px 1px 0;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-webkit-transition: border-color .5s;
-moz-transition: border-color .5s;
-o-transition: border-color .5s;
transition: border-color .5s;
position: relative;
&:hover, &:focus {
border-color: #8c8c8c;
}
&:after{
position: absolute;
top: 45%;
right: 10px;
content: '';
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #4B4B4B;
}
}
// Applied when the dropdown is focused
.dk_focus{
.dk_toggle {
border-color: #40b5e2;
box-shadow: 0 0 5px #40b5e2;
-moz-box-shadow: 0 0 5px #40b5e2;
-webkit-box-shadow: 0 0 5px #40b5e2;
}
}
// Applied whenever the dropdown is open
.dk_open {
box-shadow: 0 0 5px #40b5e2;
-moz-box-shadow: 0 0 5px #40b5e2;
-webkit-box-shadow: 0 0 5px #40b5e2;
//* Help: Dropdown menu is covered by something
//* Try setting this value higher
z-index: 10;
.dk_toggle {
background-color: #ececec;
border-color: #8c8c8c;
color: #ccc;
box-shadow: inset 0 -2px 5px #ccc;
border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
}
}
// Applied whenever the dropdown is open at the top
.dk_open_top {
.dk_toggle {
border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
}
.dk_options, .dk_options_inner {
border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
}
}
//* The outer container of the options
.dk_options {
background: #fefefe; // Removes transparent background on iOS5+ scroll
box-shadow: rgba(0, 0, 0, .2) 0 2px 8px;
-moz-box-shadow: rgba(0, 0, 0, .2) 0 2px 8px;
-webkit-box-shadow: rgba(0, 0, 0, .2) 0 2px 8px;
border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
a {
background-color: #fff;
border-bottom: 1px solid #999;
font-weight: bold;
padding: 8px 10px;
}
a:hover, &:focus,
.dk_option_current a {
background-color: #0084c7;
border-bottom-color: #004c72;
color: #fff;
text-decoration: none;
text-shadow: rgba(0, 0, 0, .5) 0 1px 0;
}
li:last-child a {
border-bottom: none;
}
.disabled {
cursor: default;
a {
color: #aaa;
}
&:hover, &:hover a
&:focus, &:focus a {
cursor: default;
background-color: #fff;
border-bottom-color: #999;
text-shadow: none;
}
}
}
// Inner container for options, this is what makes the scrollbar possible.
.dk_options_inner {
max-height: 250px;
border: 1px solid #8c8c8e;
border-bottom-width: 2px;
border-bottom-color: #999;
color: #333;
text-shadow: #fff 0 1px 0;
border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
}
//****** End Theme ******
//***** Critical to the continued enjoyment of working dropdowns ******
.dk_container {
display: none;
float: left;
a {
outline: 0;
}
}
.dk_toggle {
display: -moz-inline-stack;
display: inline-block;
*display: inline;
position: relative;
zoom: 1;
}
.dk_open {
position: relative;
.dk_options {
display: block;
}
.dk_label {
color: inherit;
}
}
.dk_options {
display: none;
margin-top: -1px;
position: absolute;
right: 0;
width: 100%;
a, a:link, a:visited{
display: block;
}
}
.dk_options_inner {
overflow: auto;
position: relative;
-webkit-overflow-scrolling: touch;
}
// Hides only dropkick <select> instances
.dk_container select {
position: absolute;
top: -99999em;
visibility: hidden;
}
// nativeMobile override
.dk_mobile {
position: relative;
select {
display: block;
width: 100%;
height: 100%;
top: 0; left: 0;
visibility: visible;
opacity: 0;
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
}
}
//***** End Critical to the continued enjoyment of working dropdowns ******