OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can be | |
4 * found in the LICENSE file. | |
5 */ | |
6 | |
7 .media-button { | |
8 position: relative; | |
9 width: 28px; | |
10 height: 28px; | |
11 background-repeat: no-repeat; | |
12 background-position: center center; | |
13 } | |
14 | |
15 .media-button > div { | |
16 position: absolute; | |
17 pointer-events: none; | |
18 width: 100%; | |
19 height: 100%; | |
20 -webkit-transition: opacity 100ms linear; | |
21 opacity: 0; | |
22 } | |
23 | |
24 .media-button[state='0']:not(.disabled):not(:hover):not(:active) > .state0.norma
l, | |
25 .media-button[state='0']:not(.disabled):hover > .state0.hover, | |
26 .media-button[state='0']:not(.disabled):active > .state0.active, | |
27 .media-button[state='1']:not(.disabled):not(:hover):not(:active) > .state1.norma
l, | |
28 .media-button[state='1']:not(.disabled):hover > .state1.hover, | |
29 .media-button[state='1']:not(.disabled):active > .state1.active, | |
30 .media-button.disabled > .disabled { | |
31 opacity: 1; | |
32 } | |
33 | |
34 /* Custom sliders for progress and volume. */ | |
35 | |
36 /* Customize the standard input[type='range']. */ | |
37 .custom-slider > input[type='range'] { | |
38 position: absolute; | |
39 -webkit-appearance: none !important; /* Hide the default thumb icon. */ | |
40 left: -2px; /* Required to align the input element with the parent. */ | |
41 top: -2px; | |
42 width: 100%; | |
43 height: 100%; | |
44 background: transparent; /* Hide the standard slider bar */ | |
45 } | |
46 | |
47 /* Custom thumb icon. */ | |
48 .custom-slider > input[type='range']::-webkit-slider-thumb { | |
49 position: relative; | |
50 -webkit-appearance: none; | |
51 z-index: 2; | |
52 height: 24px; | |
53 background-position: center center; | |
54 background-repeat: no-repeat; | |
55 } | |
56 | |
57 /* Custom slider bar (we hide the standard one). */ | |
58 .custom-slider > .bar { | |
59 position: absolute; | |
60 /* In order to match the horizontal position of the standard slider bar | |
61 left and right must be equal to 1/2 of the thumb icon width. */ | |
62 top: 11px; | |
63 bottom: 11px; | |
64 border-width: 1px; | |
65 border-top-style: solid; | |
66 border-bottom-style: solid; | |
67 pointer-events: none; /* Mouse events pass through to the standard input. */ | |
68 } | |
69 | |
70 .custom-slider > .bar > .filled, | |
71 .custom-slider > .bar > .cap { | |
72 position: absolute; | |
73 top: -1px; | |
74 bottom: -1px; | |
75 border-width: 1px; | |
76 border-style: solid; | |
77 } | |
78 | |
79 /* The filled portion of the slider bar to the left of the thumb. */ | |
80 .custom-slider > .bar > .filled { | |
81 width: 0; /* The element style.width is manipulated from the code. */ | |
82 left: 0; | |
83 border-left-style: none; | |
84 border-right-style: none; | |
85 } | |
86 | |
87 /* Rounded caps to the left and right of the slider bar. */ | |
88 .custom-slider > .bar > .cap { | |
89 width: 4px; | |
90 } | |
91 | |
92 /* Left cap is always filled, should be the same color as .filled. */ | |
93 .custom-slider > .bar > .cap.left { | |
94 right: 100%; | |
95 border-right-style: none; | |
96 border-top-left-radius: 4px; | |
97 border-bottom-left-radius: 4px; | |
98 } | |
99 | |
100 /* Right cap is always not filled. */ | |
101 .custom-slider > .bar > .cap.right { | |
102 left: 100%; | |
103 border-left-style: none; | |
104 border-top-right-radius: 4px; | |
105 border-bottom-right-radius: 4px; | |
106 } | |
107 | |
108 .custom-slider > .bar, | |
109 .custom-slider > .bar > .cap.right { | |
110 background-color: rgba(0, 0, 0, 0.5); | |
111 border-color: #808080; | |
112 } | |
113 | |
114 .custom-slider > .bar > .filled, | |
115 .custom-slider > .bar > .cap.left { | |
116 background-image: -webkit-linear-gradient(#c3c3c3, #d9d9d9); | |
117 border-color: #d9d9d9; | |
118 } | |
119 | |
120 .custom-slider.disabled > .bar > .filled, | |
121 .custom-slider.disabled > .bar > .cap.left { | |
122 background-image: none; | |
123 background-color: rgba(0, 0, 0, 0.5); | |
124 } | |
125 | |
126 .custom-slider.disabled > .bar, | |
127 .custom-slider.disabled > .bar > .filled, | |
128 .custom-slider.disabled > .bar > .cap { | |
129 border-color: #404040; | |
130 } | |
131 | |
132 .media-button.disabled, | |
133 .custom-slider.disabled, | |
134 .custom-slider.readonly { | |
135 pointer-events: none; | |
136 } | |
137 | |
138 /* Progress seek marker (precise time shown on mouse hover. */ | |
139 | |
140 /* Thin vertical line across the slider bar */ | |
141 .custom-slider > .bar > .seek-mark { | |
142 position: absolute; | |
143 left: 0; | |
144 width: 0; | |
145 top: -1px; | |
146 bottom: -1px; | |
147 background-color: #202020; | |
148 } | |
149 | |
150 .custom-slider > .bar > .seek-mark.visible { | |
151 width: 1px; | |
152 } | |
153 | |
154 .custom-slider > .bar > .seek-mark.inverted { | |
155 background-color: #808080; | |
156 } | |
157 | |
158 /* Text label giving the precise time corresponding to the hover position. */ | |
159 .custom-slider > .bar > .seek-mark > .seek-label { | |
160 position: absolute; | |
161 left: 0; | |
162 bottom: 20px; | |
163 | |
164 font-size: 13px; | |
165 | |
166 height: 0; | |
167 -webkit-transition: height 0.15s ease; | |
168 | |
169 color: white; | |
170 background: #202020; | |
171 border-top-left-radius: 2px; | |
172 border-top-right-radius: 2px; | |
173 display: -webkit-box; | |
174 -webkit-box-orient: horizontal; | |
175 -webkit-box-align: center; | |
176 -webkit-box-pack: center; | |
177 | |
178 overflow: hidden; | |
179 } | |
180 | |
181 .custom-slider > .bar > .seek-mark.visible > .seek-label { | |
182 height: 15px; | |
183 } | |
184 | |
185 /* Media controls in order of appearance. */ | |
186 | |
187 /* Play/pause button. */ | |
188 | |
189 .media-button.play { | |
190 margin-left: -7px; | |
191 margin-right: -7px; | |
192 } | |
193 | |
194 .media-button.play > .state0.normal { | |
195 background-image: url(../../images/media/media_play.png); | |
196 } | |
197 | |
198 .media-button.play > .state0.hover { | |
199 background-image: url(../../images/media/media_play_hover.png); | |
200 } | |
201 | |
202 .media-button.play > .state0.active { | |
203 background-image: url(../../images/media/media_play_down.png); | |
204 } | |
205 | |
206 .media-button.play > .state1.normal{ | |
207 background-image: url(../../images/media/media_pause.png); | |
208 } | |
209 | |
210 .media-button.play > .state1.hover { | |
211 background-image: url(../../images/media/media_pause_hover.png); | |
212 } | |
213 | |
214 .media-button.play > .state1.active { | |
215 background-image: url(../../images/media/media_pause_down.png); | |
216 } | |
217 | |
218 .media-button.play > .disabled { | |
219 background-image: url(../../images/media/media_play_disabled.png); | |
220 } | |
221 | |
222 /* Time controls: a slider and a text time display. */ | |
223 | |
224 .time-controls { | |
225 height: 100%; | |
226 display: -webkit-box; | |
227 -webkit-box-orient: horizontal; | |
228 -webkit-box-align: center; | |
229 -webkit-box-pack: center; | |
230 -webkit-box-flex: 1; | |
231 } | |
232 | |
233 .custom-slider.progress { | |
234 position: relative; | |
235 height: 100%; | |
236 display: -webkit-box; | |
237 -webkit-box-flex: 1; | |
238 margin-left: -9px; /* Set the margins at the edges of the slider bar. */ | |
239 margin-right: -9px; | |
240 } | |
241 | |
242 .custom-slider.progress > input[type='range']::-webkit-slider-thumb { | |
243 width: 28px; | |
244 background-image: url(../../images/media/media_slider_thumb.png); | |
245 } | |
246 | |
247 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:hover { | |
248 background-image: url(../../images/media/media_slider_thumb_hover.png); | |
249 } | |
250 | |
251 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:active { | |
252 background-image: url(../../images/media/media_slider_thumb_down.png); | |
253 } | |
254 | |
255 .custom-slider.progress.disabled > input[type='range']::-webkit-slider-thumb { | |
256 background-image: none; | |
257 } | |
258 | |
259 .custom-slider.progress > .bar { | |
260 left: 14px; /* Exactly 1/2 of the thumb width */ | |
261 right: 14px; | |
262 } | |
263 | |
264 /* Time display. */ | |
265 | |
266 .time-controls > .time { | |
267 position: relative; | |
268 height: 100%; | |
269 margin-left: 15px; | |
270 } | |
271 | |
272 .time-controls > .time.disabled { | |
273 opacity: 0; | |
274 } | |
275 | |
276 /* Invisible div used to compute the width required for the elapsed time. */ | |
277 .time-controls > .time > .duration { | |
278 color: transparent; | |
279 } | |
280 | |
281 .time-controls > .time > .current { | |
282 position: absolute; | |
283 right: 0; | |
284 top: 0; | |
285 bottom: 0; | |
286 display: -webkit-box; | |
287 -webkit-box-orient: horizontal; | |
288 -webkit-box-align: center; | |
289 -webkit-box-pack: end; | |
290 color: white; | |
291 } | |
292 | |
293 /* Volume controls: sound button and volume slider */ | |
294 | |
295 .volume-controls { | |
296 height: 100%; | |
297 display: -webkit-box; | |
298 -webkit-box-orient: horizontal; | |
299 -webkit-box-align: center; | |
300 -webkit-box-pack: center; | |
301 } | |
302 | |
303 /* Sound button */ | |
304 | |
305 .media-button.sound { | |
306 margin-left: -4px; | |
307 margin-right: -2px; | |
308 background-position: -2px center; | |
309 } | |
310 | |
311 .media-button.sound[level='0'] > .normal { | |
312 background-image: url(../../images/media/media_sound_disabled.png); | |
313 } | |
314 | |
315 .media-button.sound[level='0'] > .hover { | |
316 background-image: url(../../images/media/media_sound_disabled_hover.png); | |
317 } | |
318 | |
319 .media-button.sound[level='0'] > .active { | |
320 background-image: url(../../images/media/media_sound_disabled_down.png); | |
321 } | |
322 | |
323 | |
324 .media-button.sound[level='1'] > .normal { | |
325 background-image: url(../../images/media/media_sound_level1.png); | |
326 } | |
327 | |
328 .media-button.sound[level='1'] > .hover { | |
329 background-image: url(../../images/media/media_sound_level1_hover.png); | |
330 } | |
331 | |
332 .media-button.sound[level='1'] > .active { | |
333 background-image: url(../../images/media/media_sound_level1_down.png); | |
334 } | |
335 | |
336 | |
337 .media-button.sound[level='2'] > .normal { | |
338 background-image: url(../../images/media/media_sound_level2.png); | |
339 } | |
340 | |
341 .media-button.sound[level='2'] > .hover { | |
342 background-image: url(../../images/media/media_sound_level2_hover.png); | |
343 } | |
344 | |
345 .media-button.sound[level='2'] > .active { | |
346 background-image: url(../../images/media/media_sound_level2_down.png); | |
347 } | |
348 | |
349 | |
350 .media-button.sound[level='3'] > .normal { | |
351 background-image: url(../../images/media/media_sound_full.png); | |
352 } | |
353 | |
354 .media-button.sound[level='3'] > .hover { | |
355 background-image: url(../../images/media/media_sound_full_hover.png); | |
356 } | |
357 | |
358 .media-button.sound[level='3'] > .active { | |
359 background-image: url(../../images/media/media_sound_full_down.png); | |
360 } | |
361 | |
362 | |
363 .media-button.sound > .disabled { | |
364 background-image: url(../../images/media/media_sound_full_disabled.png); | |
365 } | |
366 | |
367 /* Volume slider. */ | |
368 | |
369 .custom-slider.volume { | |
370 position: relative; | |
371 height: 100%; | |
372 width: 60px; | |
373 margin-left: -4px; | |
374 margin-right: -4px; | |
375 } | |
376 | |
377 .custom-slider.volume > input[type='range']::-webkit-slider-thumb { | |
378 width: 20px; | |
379 background-image: url(../../images/media/media_volume_slider_thumb.png); | |
380 } | |
381 | |
382 .custom-slider.volume > input[type='range']::-webkit-slider-thumb:hover { | |
383 background-image: url(../../images/media/media_volume_slider_thumb_hover.png); | |
384 } | |
385 | |
386 .custom-slider.volume > input[type='range']::-webkit-slider-thumb:active { | |
387 background-image: url(../../images/media/media_volume_slider_thumb_down.png); | |
388 } | |
389 | |
390 .custom-slider.volume.disabled > input[type='range']::-webkit-slider-thumb { | |
391 background-image: none; | |
392 } | |
393 | |
394 .custom-slider.volume > .bar { | |
395 left: 10px; /* Exactly 1/2 of the thumb width */ | |
396 right: 10px; | |
397 } | |
398 | |
399 /* Horizontal video control bar, all controls in a row. */ | |
400 | |
401 .video-controls { | |
402 pointer-events: auto; | |
403 | |
404 font-size: 15px; | |
405 height: 30px; | |
406 border-radius: 5px; | |
407 | |
408 padding-left: 15px; | |
409 padding-right: 15px; | |
410 | |
411 opacity: 0.8; | |
412 | |
413 background: #202020; | |
414 | |
415 display: -webkit-box; | |
416 -webkit-box-orient: horizontal; | |
417 -webkit-box-align: center; | |
418 -webkit-box-pack: center; | |
419 } | |
420 | |
421 .video-controls .time-controls, | |
422 .video-controls .volume-controls { | |
423 margin-left: 15px; | |
424 } | |
425 | |
426 /* Fullscreen button. */ | |
427 /* There is no final decision whether we need a separate icon when toggled. */ | |
428 | |
429 .media-button.fullscreen { | |
430 margin-left: 9px; /* 15px visible margin - 6px whitespace in the icon. */ | |
431 margin-right: -6px; | |
432 } | |
433 | |
434 .media-button.fullscreen > .normal { | |
435 background-image: url(../../images/media/media_fullscreen.png); | |
436 } | |
437 | |
438 .media-button.fullscreen > .hover { | |
439 background-image: url(../../images/media/media_fullscreen_hover.png); | |
440 } | |
441 | |
442 .media-button.fullscreen > .active { | |
443 background-image: url(../../images/media/media_fullscreen_down.png); | |
444 } | |
445 | |
446 .media-button.fullscreen > .disabled { | |
447 background-image: url(../../images/media/media_fullscreen_disabled.png); | |
448 } | |
449 | |
450 .playback-state-icon { | |
451 position: absolute; | |
452 left: 50%; | |
453 top: 50%; | |
454 width: 32px; | |
455 height: 32px; | |
456 margin-left: -16px; | |
457 margin-top: -16px; | |
458 border-radius: 2.5px; | |
459 pointer-events: none; | |
460 display: none; | |
461 | |
462 background-color: #202020; | |
463 background-repeat: no-repeat; | |
464 background-position: center center; | |
465 | |
466 opacity: 1; | |
467 -webkit-transform: scaleX(1) scaleY(1); | |
468 | |
469 -webkit-transition-property: webkit-transform, opacity; | |
470 -webkit-transition-duration: 500ms; | |
471 -webkit-transition-timing-function: linear; | |
472 | |
473 z-index: 2; | |
474 } | |
475 | |
476 .playback-state-icon[visible] { | |
477 display: block; | |
478 } | |
479 | |
480 .playback-state-icon[state] { | |
481 opacity: 0; | |
482 -webkit-transform: scaleX(3) scaleY(3); | |
483 } | |
484 | |
485 .playback-state-icon[state='play'] { | |
486 background-image: url(../../images/media/media_play.png); | |
487 } | |
488 | |
489 .playback-state-icon[state='pause'] { | |
490 background-image: url(../../images/media/media_pause.png); | |
491 } | |
OLD | NEW |