1 | /*** |
---|
2 | Spectrum Colorpicker v1.1.1 |
---|
3 | https://github.com/bgrins/spectrum |
---|
4 | Author: Brian Grinstead |
---|
5 | License: MIT |
---|
6 | ***/ |
---|
7 | |
---|
8 | .sp-container { |
---|
9 | position:absolute; |
---|
10 | top:0; |
---|
11 | left:0; |
---|
12 | display:inline-block; |
---|
13 | *display: inline; |
---|
14 | *zoom: 1; |
---|
15 | /* https://github.com/bgrins/spectrum/issues/40 */ |
---|
16 | z-index: 9999994; |
---|
17 | overflow: hidden; |
---|
18 | } |
---|
19 | .sp-container.sp-flat { |
---|
20 | position: relative; |
---|
21 | } |
---|
22 | |
---|
23 | /* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ |
---|
24 | .sp-top { |
---|
25 | position:relative; |
---|
26 | width: 100%; |
---|
27 | display:inline-block; |
---|
28 | } |
---|
29 | .sp-top-inner { |
---|
30 | position:absolute; |
---|
31 | top:0; |
---|
32 | left:0; |
---|
33 | bottom:0; |
---|
34 | right:0; |
---|
35 | } |
---|
36 | .sp-color { |
---|
37 | position: absolute; |
---|
38 | top:0; |
---|
39 | left:0; |
---|
40 | bottom:0; |
---|
41 | right:20%; |
---|
42 | } |
---|
43 | .sp-hue { |
---|
44 | position: absolute; |
---|
45 | top:0; |
---|
46 | right:0; |
---|
47 | bottom:0; |
---|
48 | left:84%; |
---|
49 | height: 100%; |
---|
50 | } |
---|
51 | .sp-fill { |
---|
52 | padding-top: 80%; |
---|
53 | } |
---|
54 | .sp-sat, .sp-val { |
---|
55 | position: absolute; |
---|
56 | top:0; |
---|
57 | left:0; |
---|
58 | right:0; |
---|
59 | bottom:0; |
---|
60 | } |
---|
61 | |
---|
62 | .sp-alpha-enabled .sp-top { |
---|
63 | margin-bottom: 18px; |
---|
64 | } |
---|
65 | .sp-alpha-enabled .sp-alpha { |
---|
66 | display: block; |
---|
67 | } |
---|
68 | .sp-alpha-handle { |
---|
69 | position:absolute; |
---|
70 | top:-4px; |
---|
71 | bottom: -4px; |
---|
72 | width: 6px; |
---|
73 | left: 50%; |
---|
74 | cursor: pointer; |
---|
75 | border: 1px solid black; |
---|
76 | background: white; |
---|
77 | opacity: .8; |
---|
78 | } |
---|
79 | .sp-alpha { |
---|
80 | display: none; |
---|
81 | position: absolute; |
---|
82 | bottom: -14px; |
---|
83 | right: 0; |
---|
84 | left: 0; |
---|
85 | height: 8px; |
---|
86 | } |
---|
87 | .sp-alpha-inner { |
---|
88 | border: solid 1px #333; |
---|
89 | } |
---|
90 | |
---|
91 | /* Don't allow text selection */ |
---|
92 | .sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { |
---|
93 | -webkit-user-select:none; |
---|
94 | -moz-user-select: -moz-none; |
---|
95 | -o-user-select:none; |
---|
96 | user-select: none; |
---|
97 | } |
---|
98 | |
---|
99 | .sp-container.sp-input-disabled .sp-input-container { |
---|
100 | display: none; |
---|
101 | } |
---|
102 | .sp-container.sp-buttons-disabled .sp-button-container { |
---|
103 | display: none; |
---|
104 | } |
---|
105 | .sp-palette-only .sp-picker-container { |
---|
106 | display: none; |
---|
107 | } |
---|
108 | .sp-palette-disabled .sp-palette-container { |
---|
109 | display: none; |
---|
110 | } |
---|
111 | |
---|
112 | .sp-initial-disabled .sp-initial { |
---|
113 | display: none; |
---|
114 | } |
---|
115 | |
---|
116 | |
---|
117 | /* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ |
---|
118 | .sp-sat { |
---|
119 | background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); |
---|
120 | background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); |
---|
121 | background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); |
---|
122 | background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); |
---|
123 | background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); |
---|
124 | background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); |
---|
125 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; |
---|
126 | filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); |
---|
127 | } |
---|
128 | .sp-val { |
---|
129 | background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); |
---|
130 | background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); |
---|
131 | background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); |
---|
132 | background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); |
---|
133 | background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); |
---|
134 | background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); |
---|
135 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; |
---|
136 | filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); |
---|
137 | } |
---|
138 | |
---|
139 | .sp-hue { |
---|
140 | background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); |
---|
141 | background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); |
---|
142 | background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); |
---|
143 | background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); |
---|
144 | background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); |
---|
145 | } |
---|
146 | |
---|
147 | /* IE filters do not support multiple color stops. |
---|
148 | Generate 6 divs, line them up, and do two color gradients for each. |
---|
149 | Yes, really. |
---|
150 | */ |
---|
151 | .sp-1 { |
---|
152 | height:17%; |
---|
153 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); |
---|
154 | } |
---|
155 | .sp-2 { |
---|
156 | height:16%; |
---|
157 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); |
---|
158 | } |
---|
159 | .sp-3 { |
---|
160 | height:17%; |
---|
161 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); |
---|
162 | } |
---|
163 | .sp-4 { |
---|
164 | height:17%; |
---|
165 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); |
---|
166 | } |
---|
167 | .sp-5 { |
---|
168 | height:16%; |
---|
169 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); |
---|
170 | } |
---|
171 | .sp-6 { |
---|
172 | height:17%; |
---|
173 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); |
---|
174 | } |
---|
175 | |
---|
176 | .sp-hidden { |
---|
177 | display: none !important; |
---|
178 | } |
---|
179 | |
---|
180 | /* Clearfix hack */ |
---|
181 | .sp-cf:before, .sp-cf:after { content: ""; display: table; } |
---|
182 | .sp-cf:after { clear: both; } |
---|
183 | .sp-cf { *zoom: 1; } |
---|
184 | |
---|
185 | /* Mobile devices, make hue slider bigger so it is easier to slide */ |
---|
186 | @media (max-device-width: 480px) { |
---|
187 | .sp-color { right: 40%; } |
---|
188 | .sp-hue { left: 63%; } |
---|
189 | .sp-fill { padding-top: 60%; } |
---|
190 | } |
---|
191 | .sp-dragger { |
---|
192 | border-radius: 5px; |
---|
193 | height: 5px; |
---|
194 | width: 5px; |
---|
195 | border: 1px solid #fff; |
---|
196 | background: #000; |
---|
197 | cursor: pointer; |
---|
198 | position:absolute; |
---|
199 | top:0; |
---|
200 | left: 0; |
---|
201 | } |
---|
202 | .sp-slider { |
---|
203 | position: absolute; |
---|
204 | top:0; |
---|
205 | cursor:pointer; |
---|
206 | height: 3px; |
---|
207 | left: -1px; |
---|
208 | right: -1px; |
---|
209 | border: 1px solid #000; |
---|
210 | background: white; |
---|
211 | opacity: .8; |
---|
212 | } |
---|
213 | |
---|
214 | /* |
---|
215 | Theme authors: |
---|
216 | Here are the basic themeable display options (colors, fonts, global widths). |
---|
217 | See http://bgrins.github.io/spectrum/themes/ for instructions. |
---|
218 | */ |
---|
219 | |
---|
220 | .sp-container { |
---|
221 | border-radius: 0; |
---|
222 | background-color: #ECECEC; |
---|
223 | border: solid 1px #f0c49B; |
---|
224 | padding: 0; |
---|
225 | } |
---|
226 | .sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue |
---|
227 | { |
---|
228 | font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; |
---|
229 | -webkit-box-sizing: border-box; |
---|
230 | -moz-box-sizing: border-box; |
---|
231 | -ms-box-sizing: border-box; |
---|
232 | box-sizing: border-box; |
---|
233 | } |
---|
234 | .sp-top |
---|
235 | { |
---|
236 | margin-bottom: 3px; |
---|
237 | } |
---|
238 | .sp-color, .sp-hue |
---|
239 | { |
---|
240 | border: solid 1px #666; |
---|
241 | } |
---|
242 | |
---|
243 | /* Input */ |
---|
244 | .sp-input-container { |
---|
245 | float:right; |
---|
246 | width: 100px; |
---|
247 | margin-bottom: 4px; |
---|
248 | } |
---|
249 | .sp-initial-disabled .sp-input-container { |
---|
250 | width: 100%; |
---|
251 | } |
---|
252 | .sp-input { |
---|
253 | font-size: 12px !important; |
---|
254 | border: 1px inset; |
---|
255 | padding: 4px 5px; |
---|
256 | margin: 0; |
---|
257 | width: 100%; |
---|
258 | background:transparent; |
---|
259 | border-radius: 3px; |
---|
260 | color: #222; |
---|
261 | } |
---|
262 | .sp-input:focus { |
---|
263 | border: 1px solid orange; |
---|
264 | } |
---|
265 | .sp-input.sp-validation-error |
---|
266 | { |
---|
267 | border: 1px solid red; |
---|
268 | background: #fdd; |
---|
269 | } |
---|
270 | .sp-picker-container , .sp-palette-container |
---|
271 | { |
---|
272 | float:left; |
---|
273 | position: relative; |
---|
274 | padding: 10px; |
---|
275 | padding-bottom: 300px; |
---|
276 | margin-bottom: -290px; |
---|
277 | } |
---|
278 | .sp-picker-container |
---|
279 | { |
---|
280 | width: 172px; |
---|
281 | border-left: solid 1px #fff; |
---|
282 | } |
---|
283 | |
---|
284 | /* Palettes */ |
---|
285 | .sp-palette-container |
---|
286 | { |
---|
287 | border-right: solid 1px #ccc; |
---|
288 | } |
---|
289 | |
---|
290 | .sp-palette .sp-thumb-el { |
---|
291 | display: block; |
---|
292 | position:relative; |
---|
293 | float:left; |
---|
294 | width: 24px; |
---|
295 | height: 15px; |
---|
296 | margin: 3px; |
---|
297 | cursor: pointer; |
---|
298 | border:solid 2px transparent; |
---|
299 | } |
---|
300 | .sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { |
---|
301 | border-color: orange; |
---|
302 | } |
---|
303 | .sp-thumb-el |
---|
304 | { |
---|
305 | position:relative; |
---|
306 | } |
---|
307 | |
---|
308 | /* Initial */ |
---|
309 | .sp-initial |
---|
310 | { |
---|
311 | float: left; |
---|
312 | border: solid 1px #333; |
---|
313 | } |
---|
314 | .sp-initial span { |
---|
315 | width: 30px; |
---|
316 | height: 25px; |
---|
317 | border:none; |
---|
318 | display:block; |
---|
319 | float:left; |
---|
320 | margin:0; |
---|
321 | } |
---|
322 | |
---|
323 | /* Buttons */ |
---|
324 | .sp-button-container { |
---|
325 | float: right; |
---|
326 | } |
---|
327 | |
---|
328 | /* Replacer (the little preview div that shows up instead of the <input>) */ |
---|
329 | .sp-replacer { |
---|
330 | margin:0; |
---|
331 | overflow:hidden; |
---|
332 | cursor:pointer; |
---|
333 | padding: 4px; |
---|
334 | display:inline-block; |
---|
335 | *zoom: 1; |
---|
336 | *display: inline; |
---|
337 | border: solid 1px #91765d; |
---|
338 | background: #eee; |
---|
339 | color: #333; |
---|
340 | vertical-align: middle; |
---|
341 | } |
---|
342 | .sp-replacer:hover, .sp-replacer.sp-active { |
---|
343 | border-color: #F0C49B; |
---|
344 | color: #111; |
---|
345 | } |
---|
346 | .sp-replacer.sp-disabled { |
---|
347 | cursor:default; |
---|
348 | border-color: silver; |
---|
349 | color: silver; |
---|
350 | } |
---|
351 | .sp-dd { |
---|
352 | padding: 2px 0; |
---|
353 | height: 16px; |
---|
354 | line-height: 16px; |
---|
355 | float:left; |
---|
356 | font-size:10px; |
---|
357 | } |
---|
358 | .sp-preview |
---|
359 | { |
---|
360 | position:relative; |
---|
361 | width:25px; |
---|
362 | height: 20px; |
---|
363 | border: solid 1px #222; |
---|
364 | margin-right: 5px; |
---|
365 | float:left; |
---|
366 | z-index: 0; |
---|
367 | } |
---|
368 | |
---|
369 | .sp-palette |
---|
370 | { |
---|
371 | *width: 220px; |
---|
372 | max-width: 220px; |
---|
373 | } |
---|
374 | .sp-palette .sp-thumb-el |
---|
375 | { |
---|
376 | width:16px; |
---|
377 | height: 16px; |
---|
378 | margin:2px 1px; |
---|
379 | border: solid 1px #d0d0d0; |
---|
380 | } |
---|
381 | |
---|
382 | .sp-container |
---|
383 | { |
---|
384 | padding-bottom:0; |
---|
385 | } |
---|
386 | |
---|
387 | |
---|
388 | /* Buttons: http://hellohappy.org/css3-buttons/ */ |
---|
389 | .sp-container button { |
---|
390 | background-color: #eeeeee; |
---|
391 | background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); |
---|
392 | background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); |
---|
393 | background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); |
---|
394 | background-image: -o-linear-gradient(top, #eeeeee, #cccccc); |
---|
395 | background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); |
---|
396 | background-image: linear-gradient(to bottom, #eeeeee, #cccccc); |
---|
397 | border: 1px solid #ccc; |
---|
398 | border-bottom: 1px solid #bbb; |
---|
399 | border-radius: 3px; |
---|
400 | color: #333; |
---|
401 | font-size: 14px; |
---|
402 | line-height: 1; |
---|
403 | padding: 5px 4px; |
---|
404 | text-align: center; |
---|
405 | text-shadow: 0 1px 0 #eee; |
---|
406 | vertical-align: middle; |
---|
407 | } |
---|
408 | .sp-container button:hover { |
---|
409 | background-color: #dddddd; |
---|
410 | background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); |
---|
411 | background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); |
---|
412 | background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); |
---|
413 | background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); |
---|
414 | background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); |
---|
415 | background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); |
---|
416 | border: 1px solid #bbb; |
---|
417 | border-bottom: 1px solid #999; |
---|
418 | cursor: pointer; |
---|
419 | text-shadow: 0 1px 0 #ddd; |
---|
420 | } |
---|
421 | .sp-container button:active { |
---|
422 | border: 1px solid #aaa; |
---|
423 | border-bottom: 1px solid #888; |
---|
424 | -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; |
---|
425 | -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; |
---|
426 | -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; |
---|
427 | -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; |
---|
428 | box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; |
---|
429 | } |
---|
430 | .sp-cancel |
---|
431 | { |
---|
432 | font-size: 11px; |
---|
433 | color: #d93f3f !important; |
---|
434 | margin:0; |
---|
435 | padding:2px; |
---|
436 | margin-right: 5px; |
---|
437 | vertical-align: middle; |
---|
438 | text-decoration:none; |
---|
439 | |
---|
440 | } |
---|
441 | .sp-cancel:hover |
---|
442 | { |
---|
443 | color: #d93f3f !important; |
---|
444 | text-decoration: underline; |
---|
445 | } |
---|
446 | |
---|
447 | |
---|
448 | .sp-palette span:hover, .sp-palette span.sp-thumb-active |
---|
449 | { |
---|
450 | border-color: #000; |
---|
451 | } |
---|
452 | |
---|
453 | .sp-preview, .sp-alpha, .sp-thumb-el |
---|
454 | { |
---|
455 | position:relative; |
---|
456 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); |
---|
457 | } |
---|
458 | .sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner |
---|
459 | { |
---|
460 | display:block; |
---|
461 | position:absolute; |
---|
462 | top:0;left:0;bottom:0;right:0; |
---|
463 | } |
---|
464 | |
---|
465 | .sp-palette .sp-thumb-inner |
---|
466 | { |
---|
467 | background-position: 50% 50%; |
---|
468 | background-repeat: no-repeat; |
---|
469 | } |
---|
470 | |
---|
471 | .sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner |
---|
472 | { |
---|
473 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); |
---|
474 | } |
---|
475 | |
---|
476 | .sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner |
---|
477 | { |
---|
478 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); |
---|
479 | } |
---|