Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: third_party/WebKit/Source/core/css/mediaControlsNew.css

Issue 1424733003: Paint media element's play button using padding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed mute button padding. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2015 Google Inc. 3 * Copyright (C) 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 /* Chromium default media controls */ 26 /* Chromium default media controls */
27 27
28 /* WARNING: This css file can only style <audio> and <video> elements */ 28 /* WARNING: This css file can only style <audio> and <video> elements */
29 29
30 audio:not([controls]) { 30 audio:not([controls]) {
31 display: none !important; 31 display: none !important;
32 } 32 }
33 33
34 audio { 34 audio {
35 width: 300px; 35 width: 300px;
36 height: 48px; 36 height: 32px;
37 } 37 }
38 38
39 audio::-webkit-media-controls, 39 audio::-webkit-media-controls,
40 video::-webkit-media-controls { 40 video::-webkit-media-controls {
41 width: inherit; 41 width: inherit;
42 height: inherit; 42 height: inherit;
43 position: relative; 43 position: relative;
44 direction: ltr; 44 direction: ltr;
45 display: flex; 45 display: flex;
46 flex-direction: column; 46 flex-direction: column;
47 justify-content: flex-end; 47 justify-content: flex-end;
48 align-items: center; 48 align-items: center;
49 } 49 }
50 50
51 audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure { 51 audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure {
52 width: 100%; 52 width: 100%;
53 height: 48px; 53 height: 32px;
54 flex-shrink: 0; 54 flex-shrink: 0;
55 bottom: 0; 55 bottom: 0;
56 text-indent: 0; 56 text-indent: 0;
57 padding: 0; 57 padding: 0;
58 margin: 0; 58 margin: 0;
59 box-sizing: border-box; 59 box-sizing: border-box;
60 } 60 }
61 61
62 audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel { 62 audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel {
63 display: flex; 63 display: flex;
64 flex-direction: row; 64 flex-direction: row;
65 align-items: center; 65 align-items: center;
66 /* We use flex-start here to ensure that the play button is visible even 66 /* We use flex-start here to ensure that the play button is visible even
67 * if we are too small to show all controls. 67 * if we are too small to show all controls.
68 */ 68 */
69 justify-content: flex-start; 69 justify-content: flex-start;
70 -webkit-user-select: none; 70 -webkit-user-select: none;
71 position: relative; 71 position: relative;
72 width: 100%; 72 width: 100%;
73 z-index: 0; 73 z-index: 0;
74 overflow: hidden; 74 overflow: hidden;
75 text-align: right; 75 text-align: right;
76 bottom: auto; 76 bottom: auto;
77 height: 48px; 77 height: 32px;
78 min-width: 48px; 78 min-width: 48px;
79 background-color: #fafafa; 79 background-color: #fafafa;
80 /* The duration is also specified in MediaControlElements.cpp and LayoutTest s/media/media-controls.js */ 80 /* The duration is also specified in MediaControlElements.cpp and LayoutTest s/media/media-controls.js */
81 transition: opacity 0.3s; 81 transition: opacity 0.3s;
82 82
83 font-family: Segoe, "Helvetica Neue", Roboto, Arial, Helvetica, sans-serif ; 83 font-family: Segoe, "Helvetica Neue", Roboto, Arial, Helvetica, sans-serif ;
84 font-size: 14px; 84 font-size: 12px;
85 font-weight: normal; /* Make sure that we don't inherit non-defaults. */ 85 font-weight: normal; /* Make sure that we don't inherit non-defaults. */
86 font-style: normal; 86 font-style: normal;
87 } 87 }
88 88
89 video:-webkit-full-page-media { 89 video:-webkit-full-page-media {
90 margin: auto; 90 margin: auto;
91 position: absolute; 91 position: absolute;
92 top: 0; 92 top: 0;
93 right: 0; 93 right: 0;
94 bottom: 0; 94 bottom: 0;
95 left: 0; 95 left: 0;
96 } 96 }
97 97
98 audio:-webkit-full-page-media, video:-webkit-full-page-media { 98 audio:-webkit-full-page-media, video:-webkit-full-page-media {
99 max-height: 100%; 99 max-height: 100%;
100 max-width: 100%; 100 max-width: 100%;
101 } 101 }
102 102
103 audio:-webkit-full-page-media::-webkit-media-controls-panel, 103 audio:-webkit-full-page-media::-webkit-media-controls-panel,
104 video:-webkit-full-page-media::-webkit-media-controls-panel { 104 video:-webkit-full-page-media::-webkit-media-controls-panel {
105 bottom: 0px; 105 bottom: 0px;
106 } 106 }
107 107
108 audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-bu tton { 108 audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-bu tton {
109 -webkit-appearance: media-mute-button; 109 -webkit-appearance: media-mute-button;
110 display: flex; 110 display: flex;
111 flex: none; 111 flex: none;
112 border: none; 112 box-sizing: border-box;
113 width: 48px; 113 width: 32px;
114 height: 48px; 114 height: 32px;
115 line-height: 48px; 115 padding: 0px;
116 padding: 12px; 116 line-height: 32px;
117 border-width: 0px;
117 background-color: initial; 118 background-color: initial;
118 color: inherit; 119 color: inherit;
119 } 120 }
120 121
121 audio::-webkit-media-controls-overlay-enclosure { 122 audio::-webkit-media-controls-overlay-enclosure {
122 display: none; 123 display: none;
123 } 124 }
124 125
125 video::-webkit-media-controls-overlay-enclosure { 126 video::-webkit-media-controls-overlay-enclosure {
126 display: flex; 127 display: flex;
(...skipping 11 matching lines...) Expand all
138 overflow: hidden; 139 overflow: hidden;
139 } 140 }
140 141
141 video::-webkit-media-controls-overlay-play-button { 142 video::-webkit-media-controls-overlay-play-button {
142 -webkit-appearance: media-overlay-play-button; 143 -webkit-appearance: media-overlay-play-button;
143 display: flex; 144 display: flex;
144 position: absolute; 145 position: absolute;
145 top: 0; 146 top: 0;
146 left: 0; 147 left: 0;
147 margin: 0; 148 margin: 0;
148 border: none; 149 border-width: 0px;
149 background-color: transparent; 150 background-color: transparent;
150 width: 100%; 151 width: 100%;
151 height: 100%; 152 height: 100%;
152 padding: 0; 153 padding: 0;
153 } 154 }
154 155
155 video::-internal-media-controls-overlay-cast-button { 156 video::-internal-media-controls-overlay-cast-button {
156 -webkit-appearance: -internal-media-overlay-cast-off-button; 157 -webkit-appearance: -internal-media-overlay-cast-off-button;
157 display: flex; 158 display: flex;
158 position: absolute; 159 position: absolute;
159 top: 8px; 160 top: 8px;
160 left: 8px; 161 left: 8px;
161 margin-left: 0px; 162 margin-left: 0px;
162 margin-top: 0px; 163 margin-top: 0px;
163 border: none; 164 border-width: 0px;
164 background-color: transparent; 165 background-color: transparent;
165 width: 48px; 166 width: 32px;
166 height: 48px; 167 height: 32px;
167 padding: 0; 168 padding: 0;
168 transition: opacity 0.3s; 169 transition: opacity 0.3s;
169 } 170 }
170 171
171 audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-bu tton { 172 audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-bu tton {
172 -webkit-appearance: media-play-button; 173 -webkit-appearance: media-play-button;
173 display: flex; 174 display: flex;
174 flex: none; 175 flex: none;
175 border-sizing: border-box; 176 box-sizing: border-box;
176 width: 48px; 177 width: 32px;
177 height: 48px; 178 height: 32px;
178 line-height: 48px; 179 padding: 0px;
179 padding: 12px; 180 border-width: 0px;
181 line-height: 32px;
180 background-color: initial; 182 background-color: initial;
181 color: inherit; 183 color: inherit;
182 } 184 }
183 185
184 audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls- timeline-container { 186 audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls- timeline-container {
185 -webkit-appearance: media-controls-background; 187 -webkit-appearance: media-controls-background;
186 display: flex; 188 display: flex;
187 flex-direction: row; 189 flex-direction: row;
188 align-items: center; 190 align-items: center;
189 justify-content: flex-end; 191 justify-content: flex-end;
190 flex: 1 1; 192 flex: 1 1;
191 -webkit-user-select: none; 193 -webkit-user-select: none;
192 height: 48px; 194 height: 48px;
193 padding: 0; 195 padding: 0;
194 min-width: 0; 196 min-width: 0;
195 } 197 }
196 198
197 audio::-webkit-media-controls-current-time-display, video::-webkit-media-control s-current-time-display { 199 audio::-webkit-media-controls-current-time-display, video::-webkit-media-control s-current-time-display {
198 -webkit-appearance: media-current-time-display; 200 -webkit-appearance: media-current-time-display;
199 -webkit-user-select: none; 201 -webkit-user-select: none;
200 flex: none; 202 flex: none;
201 display: flex; 203 display: flex;
202 border: none; 204 border: none;
203 cursor: default; 205 cursor: default;
204 206
205 height: 48px; 207 height: 32px;
206 208
207 /* text runs right to the edge of the container */ 209 /* text runs right to the edge of the container */
208 padding: 0; 210 padding: 0;
209 211
210 line-height: 48px; 212 line-height: 32px;
211 color: #5a5a5a; 213 color: #5a5a5a;
212 214
213 letter-spacing: normal; 215 letter-spacing: normal;
214 word-spacing: normal; 216 word-spacing: normal;
215 text-transform: none; 217 text-transform: none;
216 text-indent: 0; 218 text-indent: 0;
217 text-shadow: none; 219 text-shadow: none;
218 text-decoration: none; 220 text-decoration: none;
219 } 221 }
220 222
221 audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-contr ols-time-remaining-display { 223 audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-contr ols-time-remaining-display {
222 -webkit-appearance: media-current-time-display; 224 -webkit-appearance: media-current-time-display;
223 -webkit-user-select: none; 225 -webkit-user-select: none;
224 flex: none; 226 flex: none;
225 display: flex; 227 display: flex;
226 border: none; 228 border: none;
227 cursor: default; 229 cursor: default;
228 230
229 height: 48px; 231 height: 32px;
230 232
231 /* text runs right to the edge of the container, plus a little on 233 /* text runs right to the edge of the container, plus a little on
232 * the left to pad the leading "/" */ 234 * the left to pad the leading "/" */
233 padding: 0 0 0 4px; 235 padding: 0 0 0 4px;
234 236
235 line-height: 48px; 237 line-height: 32px;
236 color: #5a5a5a; 238 color: #5a5a5a;
237 239
238 letter-spacing: normal; 240 letter-spacing: normal;
239 word-spacing: normal; 241 word-spacing: normal;
240 text-transform: none; 242 text-transform: none;
241 text-indent: 0; 243 text-indent: 0;
242 text-shadow: none; 244 text-shadow: none;
243 text-decoration: none; 245 text-decoration: none;
244 } 246 }
245 247
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 width: 48px; 309 width: 48px;
308 height: 48px; 310 height: 48px;
309 padding: 0px; 311 padding: 0px;
310 } 312 }
311 313
312 audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-f ullscreen-button { 314 audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-f ullscreen-button {
313 -webkit-appearance: media-enter-fullscreen-button; 315 -webkit-appearance: media-enter-fullscreen-button;
314 display: flex; 316 display: flex;
315 flex: none; 317 flex: none;
316 overflow: hidden; 318 overflow: hidden;
317 border: none; 319 box-sizing: border-box;
318 width: 48px; 320 width: 32px;
319 height: 48px; 321 height: 32px;
320 line-height: 48px; 322 padding: 0px;
323 line-height: 32px;
324 border-width: 0px;
321 background-color: initial; 325 background-color: initial;
322 color: inherit; 326 color: inherit;
323 } 327 }
324 328
325 audio::-internal-media-controls-cast-button, video::-internal-media-controls-cas t-button { 329 audio::-internal-media-controls-cast-button, video::-internal-media-controls-cas t-button {
326 -webkit-appearance: -internal-media-cast-off-button; 330 -webkit-appearance: -internal-media-cast-off-button;
327 display: flex; 331 display: flex;
328 flex: none; 332 flex: none;
329 border: none; 333 box-sizing: border-box;
330 width: 48px; 334 width: 32px;
331 height: 48px; 335 height: 32px;
332 line-height: 48px; 336 padding: 0px;
337 line-height: 32px;
338 border-width: 0px;
333 margin-left: 0px; 339 margin-left: 0px;
334 margin-right: 0px; 340 margin-right: 0px;
335 padding: 12px;
336 background-color: initial; 341 background-color: initial;
337 color: inherit; 342 color: inherit;
338 } 343 }
339 344
340 audio::-webkit-media-controls-toggle-closed-captions-button { 345 audio::-webkit-media-controls-toggle-closed-captions-button {
341 display: none; 346 display: none;
342 } 347 }
343 348
344 video::-webkit-media-controls-toggle-closed-captions-button { 349 video::-webkit-media-controls-toggle-closed-captions-button {
345 -webkit-appearance: media-toggle-closed-captions-button; 350 -webkit-appearance: media-toggle-closed-captions-button;
346 display: flex; 351 display: flex;
347 flex: none; 352 flex: none;
348 border: none; 353 box-sizing: border-box;
349 width: 48px; 354 width: 32px;
350 height: 48px; 355 height: 32px;
351 line-height: 48px; 356 padding: 0px;
357 line-height: 32px;
358 border-width: 0px;
352 margin-left: 0px; 359 margin-left: 0px;
353 margin-right: 0px; 360 margin-right: 0px;
354 padding: 12px;
355 background-color: initial; 361 background-color: initial;
356 color: inherit; 362 color: inherit;
357 } 363 }
358 364
359 audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-con trols-fullscreen-volume-slider { 365 audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-con trols-fullscreen-volume-slider {
360 display: none; 366 display: none;
361 } 367 }
362 368
363 audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media -controls-fullscreen-volume-min-button { 369 audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media -controls-fullscreen-volume-min-button {
364 display: none; 370 display: none;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 font-weight: bold; 441 font-weight: bold;
436 } 442 }
437 443
438 video::cue(u) { 444 video::cue(u) {
439 text-decoration: underline; 445 text-decoration: underline;
440 } 446 }
441 447
442 video::cue(i) { 448 video::cue(i) {
443 font-style: italic; 449 font-style: italic;
444 } 450 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698