summaryrefslogtreecommitdiffstats
path: root/admin/survey/script/jquery/jquery.ui.Slider.Pips/jquery-ui-slider-pips.css
blob: 0cfc9f0378bb7d1c2775c21e0d0d72c87eb6a5f1 (plain) (blame)
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388



    /* HORIZONTAL */
    
    /* increase bottom margin to fit the pips */
    .ui-slider-horizontal.ui-slider-pips { 
        margin-bottom: 1.4em; 
    }

    /* default hide the labels and pips that arnt visible */
    /* we just use css to hide incase we want to show certain */
    /* labels/pips individually later */
    .ui-slider-pips .ui-slider-label,
    .ui-slider-pips .ui-slider-pip-hide { 
        display: none; 
    }

    /* now we show any labels that we've set to show in the options */
    .ui-slider-pips .ui-slider-pip-label .ui-slider-label { 
        display: block; 
    }
    
    /* PIP/LABEL WRAPPER */
    /* position each pip absolutely just below the default slider */
    /* and also prevent accidental selection */
    .ui-slider-pips .ui-slider-pip { 
        width: 2em;
        height: 1em;
        line-height: 1em;
        position: absolute;
        font-size: 0.8em;
        color: #999;
        overflow: visible;
        text-align: center;
        top: 20px;
        left: 20px;
        margin-left: -1em;
        cursor: pointer;

        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    .ui-state-disabled.ui-slider-pips .ui-slider-pip {
        cursor: default;
    }

    /* little pip/line position & size */
    .ui-slider-pips .ui-slider-line {
        background: #999;
        width: 1px;
        height: 3px;
        position: absolute;
        left: 50%;
    }

    /* the text label postion & size */
    /* it overflows so no need for width to be accurate */
    .ui-slider-pips .ui-slider-label {
        position: absolute;
        top: 5px;
        left: 50%;
        margin-left: -1em;
        width: 2em;
    }

    /* make it easy to see when we hover a label */
 /*   .ui-slider-pips:not(.ui-slider-disabled) .ui-slider-pip:hover .ui-slider-label {
        color: black;
        font-weight: bold;
    }
*/



    /* VERTICAL */

    /* vertical slider needs right-margin, not bottom */
    .ui-slider-vertical.ui-slider-pips {
        margin-bottom: 1em;
        margin-right: 2em;
    }

    /* align vertical pips left and to right of the slider */
    .ui-slider-vertical.ui-slider-pips .ui-slider-pip {
        text-align: left;
        top: auto;
        left: 20px;
        margin-left: 0;
        margin-bottom: -0.5em;
    }

    /* vertical line/pip should be horizontal instead */
    .ui-slider-vertical.ui-slider-pips .ui-slider-line {
        width: 3px;
        height: 1px;
        position: absolute;
        top: 50%;
        left: 0;
    }

    .ui-slider-vertical.ui-slider-pips .ui-slider-label {
        top: 50%;
        left: 0.5em;
        margin-left: 0;
        margin-top: -0.5em;
        width: 2em;
    }




    /* FLOATING HORIZTONAL TOOLTIPS */

    /* remove the godawful looking focus outline on handle and float */
    .ui-slider-float .ui-slider-handle .classic_slider:focus,
    .ui-slider-float .ui-slider-handle .classic_slider.ui-state-focus .ui-slider-tip-label,
    .ui-slider-float .ui-slider-handle .classic_slider:focus .ui-slider-tip,
    .ui-slider-float .ui-slider-handle .classic_slider.ui-state-focus .ui-slider-tip-label,
    .ui-slider-float .ui-slider-handle .classic_slider:focus .ui-slider-tip-label
    .ui-slider-float .ui-slider-handle .classic_slider.ui-state-focus .ui-slider-tip-label {
        outline: none;
    }
    
    /* style tooltips on handles and on labels */
    /* also has a nice transition */
    .ui-slider-float .ui-slider-tip,
    .ui-slider-float .ui-slider-tip-label {

        position: absolute;
        visibility: hidden;
        top: -40px;
        display: block;
        width: 34px;
        margin-left: -18px;
        left: 50%;
        height: 20px;
        line-height: 20px;
        background: white;
        border-radius: 3px;
        border: 1px solid #888;
        text-align: center;
        font-size: 12px;
        opacity: 0;
        color: #333;
        
        -webkit-transition-duration: 200ms, 200ms, 0;
        -moz-transition-duration: 200ms, 200ms, 0;
        -ms-transition-duration: 200ms, 200ms, 0;
        transition-duration: 200ms, 200ms, 0;

        -webkit-transition-property: opacity, top, visibility;
        -moz-transition-property: opacity, top, visibility;
        -ms-transition-property: opacity, top, visibility;
        transition-property: opacity, top, visibility;
        
        -webkit-transition-delay: 0, 0, 200ms;
        -moz-transition-delay: 0, 0, 200ms;
        -ms-transition-delay: 0, 0, 200ms;
        transition-delay: 0, 0, 200ms;
    }
    
    /* show the tooltip on hover or focus */
    /* also switch transition delay around */    
    .ui-slider-float .ui-slider-handle .classic_slider:hover .ui-slider-tip,
    .ui-slider-float .ui-slider-handle .classic_slider.ui-state-hover .ui-slider-tip,
    .ui-slider-float .ui-slider-handle .classic_slider:focus .ui-slider-tip,
    .ui-slider-float .ui-slider-handle .classic_slider.ui-state-focus .ui-slider-tip,
    .ui-slider-float .ui-slider-handle .classic_slider.ui-state-active .ui-slider-tip,
    .ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label {
    
        opacity: 1;
        top: -30px;
        visibility: visible;

        -webkit-transition-delay:200ms, 200ms, 0;
        -moz-transition-delay:200ms, 200ms, 0;
        -ms-transition-delay:200ms, 200ms, 0;
        transition-delay:200ms, 200ms, 0;
        
    }
    
    /* put label tooltips below slider */
    .ui-slider-float .ui-slider-pip .ui-slider-tip-label {
        top: 42px;
    }

    .ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label {
        top: 32px;
        font-weight: normal;
    }
    
    /* give the tooltip a css triangle arrow */
    .ui-slider-float .ui-slider-tip:after,
    .ui-slider-float .ui-slider-pip .ui-slider-tip-label:after {
        content: " ";
        width: 0;
        height: 0;
        border: 5px solid rgba(255,255,255,0);
        border-top-color: rgba(255,255,255,1);
        position: absolute;
        bottom: -10px;
        left: 50%;
        margin-left: -5px;
    }

    /* put a 1px border on the tooltip arrow to match tooltip border */
    .ui-slider-float .ui-slider-tip:before,
    .ui-slider-float .ui-slider-pip .ui-slider-tip-label:before {
        content: " ";
        width: 0;
        height: 0;
        border: 5px solid rgba(255,255,255,0);
        border-top-color: #888;
        position: absolute;
        bottom: -11px;
        left: 50%;
        margin-left: -5px;
    }
    
    /* switch the arrow to top on labels */
    .ui-slider-float .ui-slider-pip .ui-slider-tip-label:after {
        border: 5px solid rgba(255,255,255,0);
        border-bottom-color: rgba(255,255,255,1);
        top: -10px;
    }

    .ui-slider-float .ui-slider-pip .ui-slider-tip-label:before {
        border: 5px solid rgba(255,255,255,0);
        border-bottom-color: #888;
        top: -11px;
    }




    /* FLOATING VERTICAL TOOLTIPS */
    
    /* tooltip floats to left of handle */
    .ui-slider-vertical.ui-slider-float .ui-slider-tip,
    .ui-slider-vertical.ui-slider-float .ui-slider-tip-label {

        top: 50%;
        margin-top: -11px;
        width: 34px;
        margin-left: 0px;
        left: -60px;
        color: #333;
        
        -webkit-transition-duration: 200ms, 200ms, 0;
        -moz-transition-duration: 200ms, 200ms, 0;
        -ms-transition-duration: 200ms, 200ms, 0;
        transition-duration: 200ms, 200ms, 0;

        -webkit-transition-property: opacity, left, visibility;
        -moz-transition-property: opacity, left, visibility;
        -ms-transition-property: opacity, left, visibility;
        transition-property: opacity, left, visibility;
        
        -webkit-transition-delay: 0, 0, 200ms;
        -moz-transition-delay: 0, 0, 200ms;
        -ms-transition-delay: 0, 0, 200ms;
        transition-delay: 0, 0, 200ms;

    }



    .ui-slider-vertical.ui-slider-float .ui-slider-handle .classic_slider:hover .ui-slider-tip,
    .ui-slider-vertical.ui-slider-float .ui-slider-handle .classic_slider.ui-state-hover .ui-slider-tip,
    .ui-slider-vertical.ui-slider-float .ui-slider-handle .classic_slider:focus .ui-slider-tip,
    .ui-slider-vertical.ui-slider-float .ui-slider-handle .classic_slider.ui-state-focus .ui-slider-tip,
    .ui-slider-vertical.ui-slider-float .ui-slider-handle .classic_slider.ui-state-active .ui-slider-tip,
    .ui-slider-vertical.ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label {
        top: 50%;
        margin-top: -11px;
        left: -50px;
    }

    /* put label tooltips to right of slider */
    .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label {
        left: 47px;
    }

    .ui-slider-vertical.ui-slider-float .ui-slider-pip:hover .ui-slider-tip-label {
        left: 37px;
    }

    /* give the tooltip a css triangle arrow */
    .ui-slider-vertical.ui-slider-float .ui-slider-tip:after,
    .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:after {
        border: 5px solid rgba(255,255,255,0);
        border-left-color: rgba(255,255,255,1);
        border-top-color: transparent;
        position: absolute;
        bottom: 50%;
        margin-bottom: -5px;
        right: -10px;
        margin-left: 0;
        top: auto;
        left: auto;
    }

    .ui-slider-vertical.ui-slider-float .ui-slider-tip:before,
    .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:before {
        border: 5px solid rgba(255,255,255,0);
        border-left-color: #888;
        border-top-color: transparent;
        position: absolute;
        bottom: 50%;
        margin-bottom: -5px;
        right: -11px;
        margin-left: 0; 
        top: auto;
        left: auto;
    }
    
    .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:after {
        border: 5px solid rgba(255,255,255,0);
        border-right-color: rgba(255,255,255,1);
        right: auto;
        left: -10px;
    }

    .ui-slider-vertical.ui-slider-float .ui-slider-pip .ui-slider-tip-label:before {
        border: 5px solid rgba(255,255,255,0);
        border-right-color: #888;
        right: auto;
        left: -11px;
    }














    /* SELECTED STATES */
    /* Comment out this chuck of code if you don't want to have
        the new label colours shown */
/*
    .ui-slider-pips [class*=ui-slider-pip-initial] {

        font-weight: bold;        
        color: #14CA82;

    }

    .ui-slider-pips .ui-slider-pip-initial-1 {

    }

    .ui-slider-pips .ui-slider-pip-initial-2 {
        color: #1897C9;
    }



    .ui-slider-pips [class*=i-slider-pip-selected] {

        font-weight: bold;
        color: #FF7A00;

    }

    .ui-slider-pips .ui-slider-pip-selected-1 {

    }

    .ui-slider-pips .ui-slider-pip-selected-2 {
        color: #E70081;
    }




*/