OLD | NEW |
1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. */ | 3 * found in the LICENSE file. */ |
4 | 4 |
5 /* Controls bar. */ | 5 /* Controls bar. */ |
6 .controls { | 6 .controls { |
7 align-items: center; | 7 align-items: center; |
8 background-color: white; | 8 background-color: white; |
9 display: flex; | 9 display: flex; |
10 flex-direction: column; | 10 flex-direction: column; |
11 height: 64px; | 11 height: 96px; |
12 justify-content: center; | 12 justify-content: center; |
13 padding: 0; | 13 padding: 0; |
14 } | 14 } |
15 | 15 |
16 .controls .upper-controls { | 16 .controls .upper-controls, |
17 height: 32px; | |
18 width: 100% | |
19 } | |
20 | |
21 .controls .lower-controls { | 17 .controls .lower-controls { |
22 height: 32px; | 18 box-sizing: border-box; |
23 width: 100% | 19 height: 48px; |
| 20 padding: 8px; |
| 21 width: 100%; |
24 } | 22 } |
25 | 23 |
26 .audio-controls { | 24 .audio-controls { |
27 align-items: center; | 25 align-items: center; |
28 display: flex; | 26 display: flex; |
29 flex-direction: row; | 27 flex-direction: row; |
30 justify-content: center; | 28 justify-content: center; |
31 padding: 0; | 29 padding: 0; |
32 } | 30 } |
33 | 31 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 /* Time controls: a slider and a text time display. */ | 73 /* Time controls: a slider and a text time display. */ |
76 | 74 |
77 .time-controls { | 75 .time-controls { |
78 align-items: center; | 76 align-items: center; |
79 display: flex; | 77 display: flex; |
80 flex-direction: row; | 78 flex-direction: row; |
81 height: 100%; | 79 height: 100%; |
82 justify-content: center; | 80 justify-content: center; |
83 } | 81 } |
84 | 82 |
85 .custom-slider.progress { | 83 .time-controls > .time-container { |
86 display: flex; | 84 color: rgb(51, 51, 51); |
87 flex: 1 1 auto; | 85 cursor: default; |
88 height: 100%; | 86 flex: none; |
| 87 font-size: 12px; |
| 88 padding: 8px; |
89 position: relative; | 89 position: relative; |
90 z-index: 0; /* Make a layer which includes the thumb on slider. */ | |
91 } | 90 } |
92 | 91 |
93 .custom-slider.progress > input[type='range']::-webkit-slider-thumb { | 92 .time-container > .time { |
94 background-image: -webkit-image-set( | 93 position: absolute; |
95 url(../assets/100/player_timeline_handler.png) 1x, | 94 right: 8px; /* Should be same as time-container's right padding. */ |
96 url(../assets/200/player_timeline_handler.png) 2x); | 95 top: 8px; /* Should be same as time-container's top padding. */ |
97 width: 28px; | |
98 } | 96 } |
99 | 97 |
100 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:hover { | 98 .time-container > .time.disabled { |
101 background-image: -webkit-image-set( | |
102 url(../assets/100/player_timeline_handler.png) 1x, | |
103 url(../assets/200/player_timeline_handler.png) 2x); | |
104 } | |
105 | |
106 .custom-slider.progress > input[type='range']::-webkit-slider-thumb:active { | |
107 background-image: -webkit-image-set( | |
108 url(../assets/100/player_timeline_handler_pressed.png) 1x, | |
109 url(../assets/200/player_timeline_handler_pressed.png) 2x); | |
110 } | |
111 | |
112 .custom-slider.progress.disabled > input[type='range']::-webkit-slider-thumb { | |
113 background-image: none; | |
114 } | |
115 | |
116 .time-controls > .time { | |
117 cursor: default; | |
118 height: 100%; | |
119 position: relative; | |
120 width: 53px; | |
121 } | |
122 | |
123 .time-controls > .time.disabled { | |
124 opacity: 0; | 99 opacity: 0; |
125 } | 100 } |
126 | 101 |
127 .custom-slider > input[type='range'] { | 102 .time-container > .time-spacer { |
128 -webkit-appearance: none !important; /* Hide the default thumb icon. */ | 103 opacity: 0; /* This class is intended to be used as invisible spacer. */ |
129 background: transparent; /* Hide the standard slider bar */ | |
130 height: 100%; | |
131 left: -2px; /* Required to align the input element with the parent. */ | |
132 outline: none; | |
133 position: absolute; | |
134 top: -2px; | |
135 width: 100%; | |
136 } | 104 } |
137 | 105 |
138 /* Custom thumb icon. */ | 106 .time-controls > paper-slider { |
139 .custom-slider > input[type='range']::-webkit-slider-thumb { | 107 --paper-slider-active-color: rgb(66, 133, 244); |
140 -webkit-appearance: none; | 108 --paper-slider-knob-color: rgb(64, 138, 241); |
141 background-position: center center; | 109 flex: auto; |
142 background-repeat: no-repeat; | |
143 height: 24px; | |
144 position: relative; | |
145 z-index: 2; | |
146 } | |
147 | |
148 /* Custom slider bar (we hide the standard one). */ | |
149 .custom-slider > .bar { | |
150 background-image: -webkit-image-set( | |
151 url(../assets/100/player_timeline_base_center.png) 1x, | |
152 url(../assets/200/player_timeline_base_center.png) 2x); | |
153 /* In order to match the horizontal position of the standard slider bar | |
154 left and right must be equal to 1/2 of the thumb icon width. */ | |
155 bottom: 15px; | |
156 left: 14px; /* Exactly 1/2 of the thumb width */ | |
157 pointer-events: none; /* Mouse events pass through to the standard input. */ | |
158 position: absolute; | |
159 right: 14px; | |
160 top: 15px; | |
161 } | |
162 | |
163 .custom-slider > .bar > .filled, | |
164 .custom-slider > .bar > .cap { | |
165 bottom: 0; | |
166 position: absolute; | |
167 top: 0; | |
168 } | |
169 | |
170 /* The filled portion of the slider bar to the left of the thumb. */ | |
171 .custom-slider > .bar > .filled { | |
172 background-image: -webkit-image-set( | |
173 url(../assets/100/player_timeline_played_center.png) 1x, | |
174 url(../assets/200/player_timeline_played_center.png) 2x); | |
175 border-left-style: none; | |
176 border-right-style: none; | |
177 left: 0; | |
178 width: 0; /* The element style.width is manipulated from the code. */ | |
179 } | |
180 | |
181 /* Rounded caps to the left and right of the slider bar. */ | |
182 .custom-slider > .bar > .cap { | |
183 width: 1px; | |
184 } | |
185 | |
186 /* Left cap is always filled, should be the same color as .filled. */ | |
187 .custom-slider > .bar > .cap.left { | |
188 background-image: -webkit-image-set( | |
189 url(../assets/100/player_timeline_played_left.png) 1x, | |
190 url(../assets/200/player_timeline_played_left.png) 2x); | |
191 right: 100%; | |
192 } | |
193 | |
194 /* Right cap is always not filled. */ | |
195 .custom-slider > .bar > .cap.right { | |
196 background-image: -webkit-image-set( | |
197 url(../assets/100/player_timeline_base_right.png) 1x, | |
198 url(../assets/200/player_timeline_base_right.png) 2x); | |
199 left: 100%; | |
200 } | 110 } |
201 | 111 |
202 .media-button.disabled, | 112 .media-button.disabled, |
203 .custom-slider.disabled, | 113 paper-slider.disabled { |
204 .custom-slider.readonly { | |
205 pointer-events: none; | 114 pointer-events: none; |
206 } | 115 } |
207 | 116 |
208 /* Progress seek marker (precise time shown on mouse hover. */ | |
209 | |
210 /* Thin vertical line across the slider bar */ | |
211 .custom-slider > .bar > .seek-mark { | |
212 background-color: #202020; | |
213 bottom: -1px; | |
214 left: 0; | |
215 position: absolute; | |
216 top: -1px; | |
217 width: 0; | |
218 } | |
219 | |
220 .custom-slider > .bar > .seek-mark.visible { | |
221 width: 1px; | |
222 } | |
223 | |
224 .custom-slider > .bar > .seek-mark.inverted { | |
225 background-color: #808080; | |
226 } | |
227 | |
228 /* Text label giving the precise time corresponding to the hover position. */ | |
229 .custom-slider > .bar > .seek-mark > .seek-label { | |
230 align-items: center; | |
231 background: #202020; | |
232 border-top-left-radius: 2px; | |
233 border-top-right-radius: 2px; | |
234 bottom: 19px; | |
235 color: white; | |
236 display: flex; | |
237 flex-direction: row; | |
238 font-size: 12px; | |
239 height: 15px; | |
240 justify-content: center; | |
241 left: 0; | |
242 opacity: 0; | |
243 overflow: hidden; | |
244 position: absolute; | |
245 transition: opacity 150ms ease; | |
246 } | |
247 | |
248 .custom-slider > .bar > .seek-mark.visible > .seek-label { | |
249 opacity: 1; | |
250 } | |
251 | |
252 /* Media controls in order of appearance. */ | 117 /* Media controls in order of appearance. */ |
253 | 118 |
254 .audio-controls { | 119 .audio-controls { |
255 align-items: center; | 120 align-items: center; |
256 display: flex; | 121 display: flex; |
257 flex-direction: row; | 122 flex-direction: row; |
258 height: 100%; | 123 height: 100%; |
259 justify-content: center; | 124 justify-content: center; |
260 } | 125 } |
261 | 126 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 top: 2px; | 221 top: 2px; |
357 width: 28px; | 222 width: 28px; |
358 pointer-events: none; | 223 pointer-events: none; |
359 } | 224 } |
360 | 225 |
361 .media-button files-toggle-ripple::shadow .ripple.activated { | 226 .media-button files-toggle-ripple::shadow .ripple.activated { |
362 opacity: 0.1; | 227 opacity: 0.1; |
363 } | 228 } |
364 | 229 |
365 /* Invisible div used to compute the width required for the elapsed time. */ | 230 /* Invisible div used to compute the width required for the elapsed time. */ |
366 .time-controls > .time > .duration, | |
367 .time-controls > .time > .current { | 231 .time-controls > .time > .current { |
368 align-items: center; | 232 align-items: center; |
369 color: rgb(51, 51, 51); | |
370 display: flex; | 233 display: flex; |
371 flex-direction: row; | 234 flex-direction: row; |
372 font-size: 12px; | |
373 height: 100%; | 235 height: 100%; |
374 justify-content: flex-end; | 236 justify-content: flex-end; |
375 position: absolute; | 237 position: absolute; |
376 top: -1px; | 238 top: -1px; |
377 } | 239 } |
378 | 240 |
379 .time-controls > .time > .duration { | |
380 left: 0; | |
381 } | |
382 | |
383 .time-controls > .time > .current { | |
384 right: 0; | |
385 } | |
386 | |
387 /* Volume controls: sound button and volume slider */ | 241 /* Volume controls: sound button and volume slider */ |
388 | 242 |
389 #volumeContainer { | 243 #volumeContainer { |
390 border: 1px solid #ddd; | 244 border: 1px solid #ddd; |
391 border-radius: 2px; | 245 border-radius: 2px; |
392 box-shadow: 0 2px 4px #777; | 246 box-shadow: 0 2px 4px #777; |
393 height: 110px; | 247 height: 110px; |
394 position: fixed; | 248 position: fixed; |
395 width: 32px; | 249 width: 32px; |
396 } | 250 } |
397 | 251 |
398 #volumeContainer.default-hidden { | 252 #volumeContainer.default-hidden { |
399 visibility: hidden; | 253 visibility: hidden; |
400 } | 254 } |
OLD | NEW |