spectrum-rails 1.0.9

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