2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 /* Chromium default media controls */
28 /* WARNING: This css file can only style <audio> and <video> elements */
35 audio::-webkit-media-controls,
36 video::-webkit-media-controls {
42 flex-direction: column;
43 justify-content: flex-end;
47 audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure {
55 box-sizing: border-box;
58 video::-webkit-media-controls-enclosure {
59 padding: 0px 5px 5px 5px;
64 audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
68 /* We use flex-start here to ensure that the play button is visible even
69 * if we are too small to show all controls.
71 justify-content: flex-start;
72 -webkit-user-select: none;
80 background-color: rgba(20, 20, 20, 0.8);
82 /* The duration is also specified in MediaControlElements.cpp and LayoutTests/media/media-controls.js */
83 transition: opacity 0.3s;
86 video:-webkit-full-page-media {
95 audio:-webkit-full-page-media, video:-webkit-full-page-media {
100 audio:-webkit-full-page-media::-webkit-media-controls-panel,
101 video:-webkit-full-page-media::-webkit-media-controls-panel {
105 audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button {
106 -webkit-appearance: media-mute-button;
110 box-sizing: border-box;
116 background-color: initial;
120 audio::-webkit-media-controls-overlay-enclosure {
124 video::-webkit-media-controls-overlay-enclosure {
127 flex-direction: column;
128 justify-content: flex-end;
134 box-sizing: border-box;
138 video::-webkit-media-controls-overlay-play-button {
139 -webkit-appearance: media-overlay-play-button;
147 box-sizing: border-box;
148 background-color: transparent;
154 audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button {
155 -webkit-appearance: media-play-button;
159 box-sizing: border-box;
166 background-color: initial;
170 audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container {
171 -webkit-appearance: media-controls-background;
175 justify-content: flex-end;
177 -webkit-user-select: none;
182 audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display,
183 audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display {
184 -webkit-appearance: media-current-time-display;
185 -webkit-user-select: none;
196 font-family: Arial, Helvetica, sans-serif;
202 letter-spacing: normal;
203 word-spacing: normal;
204 text-transform: none;
207 text-decoration: none;
210 audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline {
211 -webkit-appearance: media-slider;
217 background-color: transparent;
223 audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider {
224 -webkit-appearance: media-volume-slider;
226 /* The 1.9 value was empirically chosen to match old-flexbox behaviour
227 * and be aesthetically pleasing.
234 background-color: transparent;
240 /* FIXME these shouldn't use special pseudoShadowIds, but nicer rules.
241 https://code.google.com/p/chromium/issues/detail?id=112508
242 https://bugs.webkit.org/show_bug.cgi?id=62218
244 input[type="range" i]::-webkit-media-slider-container {
247 flex-direction: row; /* This property is updated by C++ code. */
248 box-sizing: border-box;
251 border: 1px solid rgba(230, 230, 230, 0.35);
253 background-color: transparent; /* Background drawing is managed by C++ code to draw ranges. */
256 /* The negative right margin causes the track to overflow its container. */
257 input[type="range" i]::-webkit-media-slider-container > div {
261 input[type="range" i]::-webkit-media-slider-thumb {
266 audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button {
267 -webkit-appearance: media-enter-fullscreen-button;
271 box-sizing: border-box;
278 background-color: initial;
282 audio::-webkit-media-controls-toggle-closed-captions-button {
286 video::-webkit-media-controls-toggle-closed-captions-button {
287 -webkit-appearance: media-toggle-closed-captions-button;
291 box-sizing: border-box;
298 background-color: initial;
302 audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-controls-fullscreen-volume-slider {
306 audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media-controls-fullscreen-volume-min-button {
310 audio::-webkit-media-controls-fullscreen-volume-max-button, video::-webkit-media-controls-fullscreen-volume-max-button {
314 video::-webkit-media-text-track-container {
320 font: 22px sans-serif;
322 color: rgba(255, 255, 255, 1);
324 letter-spacing: normal;
325 word-spacing: normal;
326 text-transform: none;
328 text-decoration: none;
329 pointer-events: none;
330 -webkit-user-select: none;
331 word-break: break-word;
339 background-color: rgba(0, 0, 0, 0.8);
343 video::-webkit-media-text-track-region {
346 writing-mode: horizontal-tb;
347 background: rgba(0, 0, 0, 0.8);
348 color: rgba(255, 255, 255, 1);
349 word-wrap: break-word;
350 overflow-wrap: break-word;
354 video::-webkit-media-text-track-region-container {
359 flex-direction: column;
362 video::-webkit-media-text-track-region-container.scrolling {
363 transition: top 433ms linear;
367 video::-webkit-media-text-track-display {
370 white-space: pre-wrap;
371 -webkit-box-sizing: border-box;
375 video::cue(:future) {
379 video::-webkit-media-text-track-container b {
383 video::-webkit-media-text-track-container u {
384 text-decoration: underline;
387 video::-webkit-media-text-track-container i {