1 /* Copyright 2014 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */
8 background-color: #fff;
10 flex-direction: column
;
12 justify-content: center
;
16 .controls .upper-controls {
21 .controls .lower-controls {
30 justify-content: center
;
34 /* Customized scrollbar for the playlist. */
37 background-color: #fff;
40 outline: none
; /* TODO(yoshiki): Show outline only on keyboard focus. */
46 .media-button:active {
47 background-image: -webkit-image-set
(
48 url
(../assets/100/player_button_pressed.png) 1x,
49 url
(../assets/200/player_button_pressed.png) 2x);
53 .media-button.toggle > label > span {
54 display: inline-block
;
57 transition: opacity
100ms linear
;
68 .media-button
[state
='default']:not
(.disabled
) > .default
,
69 .media-button
[state
='ended']:not
(.disabled
) > .ended
,
70 .media-button
[state
='playing']:not
(.disabled
) > .playing
,
71 .media-button.disabled > .disabled {
75 /* Custom sliders for progress and volume. */
77 /* Customize the standard input[type='range']. */
79 /* Time controls: a slider and a text time display. */
86 justify-content: center
;
89 .custom-slider.progress {
94 z-index: 0; /* Make a layer which includes the thumb on slider. */
97 .custom-slider.progress > input[type='range']::-webkit-slider-thumb {
98 background-image: -webkit-image-set
(
99 url
(../assets/100/player_timeline_handler.png) 1x,
100 url
(../assets/200/player_timeline_handler.png) 2x);
104 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:hover {
105 background-image: -webkit-image-set
(
106 url
(../assets/100/player_timeline_handler.png) 1x,
107 url
(../assets/200/player_timeline_handler.png) 2x);
110 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:active {
111 background-image: -webkit-image-set
(
112 url
(../assets/100/player_timeline_handler_pressed.png) 1x,
113 url
(../assets/200/player_timeline_handler_pressed.png) 2x);
116 .custom-slider.progress.disabled > input[type='range']::-webkit-slider-thumb {
117 background-image: none
;
120 .time-controls > .time {
127 .time-controls > .time.disabled {
131 .custom-slider > input[type='range'] {
132 -webkit-appearance: none
!important
; /* Hide the default thumb icon. */
133 background: transparent
; /* Hide the standard slider bar */
135 left: -2px; /* Required to align the input element with the parent. */
142 /* Custom thumb icon. */
143 .custom-slider > input[type='range']::-webkit-slider-thumb {
144 -webkit-appearance: none
;
145 background-position: center center
;
146 background-repeat: no-repeat
;
152 /* Custom slider bar (we hide the standard one). */
153 .custom-slider > .bar {
154 background-image: -webkit-image-set
(
155 url
(../assets/100/player_timeline_base_center.png) 1x,
156 url
(../assets/200/player_timeline_base_center.png) 2x);
157 /* In order to match the horizontal position of the standard slider bar
158 left and right must be equal to 1/2 of the thumb icon width. */
160 left: 14px; /* Exactly 1/2 of the thumb width */
161 pointer-events: none
; /* Mouse events pass through to the standard input. */
167 .custom-slider
> .bar
> .filled
,
168 .custom-slider > .bar > .cap {
174 /* The filled portion of the slider bar to the left of the thumb. */
175 .custom-slider > .bar > .filled {
176 background-image: -webkit-image-set
(
177 url
(../assets/100/player_timeline_played_center.png) 1x,
178 url
(../assets/200/player_timeline_played_center.png) 2x);
179 border-left-style: none
;
180 border-right-style: none
;
182 width: 0; /* The element style.width is manipulated from the code. */
185 /* Rounded caps to the left and right of the slider bar. */
186 .custom-slider > .bar > .cap {
190 /* Left cap is always filled, should be the same color as .filled. */
191 .custom-slider > .bar > .cap.left {
192 background-image: -webkit-image-set
(
193 url
(../assets/100/player_timeline_played_left.png) 1x,
194 url
(../assets/200/player_timeline_played_left.png) 2x);
198 /* Right cap is always not filled. */
199 .custom-slider > .bar > .cap.right {
200 background-image: -webkit-image-set
(
201 url
(../assets/100/player_timeline_base_right.png) 1x,
202 url
(../assets/200/player_timeline_base_right.png) 2x);
206 .media-button
.disabled
,
207 .custom-slider
.disabled
,
208 .custom-slider.readonly {
209 pointer-events: none
;
212 /* Progress seek marker (precise time shown on mouse hover. */
214 /* Thin vertical line across the slider bar */
215 .custom-slider > .bar > .seek-mark {
216 background-color: #202020;
224 .custom-slider > .bar > .seek-mark.visible {
228 .custom-slider > .bar > .seek-mark.inverted {
229 background-color: #808080;
232 /* Text label giving the precise time corresponding to the hover position. */
233 .custom-slider > .bar > .seek-mark > .seek-label {
236 border-top-left-radius: 2px;
237 border-top-right-radius: 2px;
244 justify-content: center
;
249 transition: opacity
150ms ease
;
252 .custom-slider > .bar > .seek-mark.visible > .seek-label {
256 /* Media controls in order of appearance. */
263 justify-content: center
;
266 /* Play/pause button. */
268 .media-button.toggle input {
273 .media-button.shuffle-mode {
278 .media-button.shuffle-mode > label > .icon {
279 background-image: -webkit-image-set
(
280 url
(../assets/100/player_button_shuffle.png) 1x,
281 url
(../assets/200/player_button_shuffle.png) 2x);
282 pointer-events: auto
;
285 .media-button.shuffle-mode > label > input:checked + .icon {
286 background-image: -webkit-image-set
(
287 url
(../assets/100/player_button_shuffle_active.png) 1x,
288 url
(../assets/200/player_button_shuffle_active.png) 2x);
291 .media-button.repeat {
296 .media-button.repeat > label > .icon {
297 background-image: -webkit-image-set
(
298 url
(../assets/100/player_button_repeat.png) 1x,
299 url
(../assets/200/player_button_repeat.png) 2x);
300 pointer-events: auto
;
303 .media-button.repeat > label > input:checked + .icon {
304 background-image: -webkit-image-set
(
305 url
(../assets/100/player_button_repeat_active.png) 1x,
306 url
(../assets/200/player_button_repeat_active.png) 2x);
314 .media-button.play > .ended {
315 background-image: -webkit-image-set
(
316 url
(../assets/100/player_button_play.png) 1x,
317 url
(../assets/200/player_button_play.png) 2x);
320 .media-button.play > .playing {
321 background-image: -webkit-image-set
(
322 url
(../assets/100/player_button_pause.png) 1x,
323 url
(../assets/200/player_button_pause.png) 2x);
326 .media-button.previous {
331 .media-button.previous > .normal {
332 background-image: -webkit-image-set
(
333 url
(../assets/100/player_button_previous.png) 1x,
334 url
(../assets/200/player_button_previous.png) 2x);
342 .media-button.next > .normal {
343 background-image: -webkit-image-set
(
344 url
(../assets/100/player_button_next.png) 1x,
345 url
(../assets/200/player_button_next.png) 2x);
348 .media-button.volume {
353 .media-button.volume > .normal {
354 background-image: -webkit-image-set
(
355 url
(../assets/100/player_button_volume.png) 1x,
356 url
(../assets/200/player_button_volume.png) 2x);
359 .media-button.volume > label > .icon {
360 background-image: -webkit-image-set
(
361 url
(../assets/100/player_button_volume.png) 1x,
362 url
(../assets/200/player_button_volume.png) 2x);
363 pointer-events: auto
;
366 .media-button.volume > label > input:checked + .icon {
367 background-image: -webkit-image-set
(
368 url
(../assets/100/player_button_volume_active.png) 1x,
369 url
(../assets/200/player_button_volume_active.png) 2x);
372 .media-button.playlist {
377 .media-button.playlist > label > .icon {
378 background-image: -webkit-image-set
(
379 url
(../assets/100/player_button_playlist.png) 1x,
380 url
(../assets/200/player_button_playlist.png) 2x);
381 pointer-events: auto
;
384 .media-button.playlist > label > input:checked + .icon {
385 background-image: -webkit-image-set
(
386 url
(../assets/100/player_button_playlist_active.png) 1x,
387 url
(../assets/200/player_button_playlist_active.png) 2x);
391 /* Invisible div used to compute the width required for the elapsed time. */
392 .time-controls
> .time
> .duration
,
393 .time-controls > .time > .current {
400 justify-content: flex-end
;
405 .time-controls > .time > .duration {
409 .time-controls > .time > .current {
413 /* Volume controls: sound button and volume slider */
416 border: 1px solid
#ddd;
418 box-shadow: 0 2px 4px #777;
424 #volumeContainer.default-hidden
{