toolkit/themes/osx/global/media/videocontrols.css

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
michael@0 6 @namespace html url("http://www.w3.org/1999/xhtml");
michael@0 7
michael@0 8 .controlBar {
michael@0 9 height: 28px;
michael@0 10 background-color: rgba(35,31,32,.74);
michael@0 11 }
michael@0 12
michael@0 13 .playButton,
michael@0 14 .muteButton,
michael@0 15 .fullscreenButton {
michael@0 16 background-color: transparent;
michael@0 17 background-repeat: no-repeat;
michael@0 18 background-position: center;
michael@0 19 -moz-appearance: none; /* Remove the native button appearance and styling */
michael@0 20 margin: 0;
michael@0 21 padding: 0;
michael@0 22 min-height: 28px;
michael@0 23 min-width: 28px;
michael@0 24 border: none;
michael@0 25 opacity: 0.7;
michael@0 26 }
michael@0 27
michael@0 28 .playButton:hover,
michael@0 29 .muteButton:hover,
michael@0 30 .fullscreenButton:hover {
michael@0 31 opacity: 1;
michael@0 32 }
michael@0 33
michael@0 34 .playButton:hover:active,
michael@0 35 .muteButton:hover:active,
michael@0 36 .fullscreenButton:hover:active {
michael@0 37 opacity: 0.4;
michael@0 38 }
michael@0 39
michael@0 40 .playButton {
michael@0 41 background-image: url(chrome://global/skin/media/pauseButton.png);
michael@0 42 margin-right: -22px; /* 1/2 of scrubber thumb width, for overhang. */
michael@0 43 position: relative; /* Trick to work around negative margin interfering with clicking on the button. */
michael@0 44 }
michael@0 45
michael@0 46 .playButton[paused] {
michael@0 47 background-image: url(chrome://global/skin/media/playButton.png);
michael@0 48 }
michael@0 49
michael@0 50 .muteButton {
michael@0 51 background-image: url(chrome://global/skin/media/muteButton.png);
michael@0 52 min-width: 33px;
michael@0 53 }
michael@0 54 .muteButton[muted] {
michael@0 55 background-image: url(chrome://global/skin/media/unmuteButton.png);
michael@0 56 }
michael@0 57
michael@0 58 .muteButton[noAudio] {
michael@0 59 background-image: url(chrome://global/skin/media/noAudio.png);
michael@0 60 }
michael@0 61
michael@0 62 .muteButton[noAudio] + .volumeStack {
michael@0 63 display: none;
michael@0 64 }
michael@0 65
michael@0 66 .fullscreenButton {
michael@0 67 background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton.png"), 0, 16, 16, 0);
michael@0 68 }
michael@0 69
michael@0 70 .fullscreenButton[fullscreened] {
michael@0 71 background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton.png"), 0, 32, 16, 16);
michael@0 72 }
michael@0 73
michael@0 74 .volumeControl {
michael@0 75 width: 32px;
michael@0 76 opacity: 0;
michael@0 77 }
michael@0 78
michael@0 79 .volumeBackground,
michael@0 80 .volumeForeground {
michael@0 81 background-repeat: no-repeat;
michael@0 82 background-position: center;
michael@0 83 width: 32px;
michael@0 84 }
michael@0 85
michael@0 86 .volumeBackground {
michael@0 87 background-image: url(chrome://global/skin/media/volume-empty.png);
michael@0 88 }
michael@0 89
michael@0 90 .volumeForeground {
michael@0 91 background-image: url(chrome://global/skin/media/volume-full.png);
michael@0 92 background-clip: content-box;
michael@0 93 }
michael@0 94
michael@0 95 .controlBar[audio-only] > .volumeStack {
michael@0 96 /* This value is duplicated in the videocontrols.xml adjustControlSize function. */
michael@0 97 -moz-margin-end: 8px;
michael@0 98 }
michael@0 99
michael@0 100 .volumeControl .scale-thumb {
michael@0 101 min-width: 0;
michael@0 102 opacity: 0;
michael@0 103 }
michael@0 104
michael@0 105 .durationBox {
michael@0 106 -moz-box-pack: center;
michael@0 107 }
michael@0 108
michael@0 109 .durationLabel {
michael@0 110 margin-left: -22px; /* 1/2 of scrubber thumb width, for overhang. */
michael@0 111 padding-left: 8px; /* don't bump into the scrubber bar */
michael@0 112 padding-top: 2px; /* center vertically with scrubber bar */
michael@0 113 color: rgba(255,255,255,.75);
michael@0 114 font-size: 11px;
michael@0 115 font-family: Helvetica, sans-serif;
michael@0 116 }
michael@0 117
michael@0 118 .positionLabel {
michael@0 119 display: none;
michael@0 120 }
michael@0 121
michael@0 122 .backgroundBar {
michael@0 123 /* margin top/bottom: make bar 8px tall (control height = 28, minus 2 * 10 margin) */
michael@0 124 /* margin left/right: 1/2 of scrubber thumb width, for overhang. */
michael@0 125 margin: 10px 22px;
michael@0 126 background-color: rgba(255,255,255,.5);
michael@0 127 border-radius: 2.5px;
michael@0 128 }
michael@0 129
michael@0 130 .bufferBar,
michael@0 131 .progressBar {
michael@0 132 /* margin top/bottom: make bar 8px tall (control height = 28, minus 2 * 10 margin) */
michael@0 133 /* margin left/right: 1/2 of scrubber thumb width, for overhang. */
michael@0 134 margin: 10px 22px;
michael@0 135 -moz-appearance: none;
michael@0 136 min-width: 0;
michael@0 137 }
michael@0 138
michael@0 139 /* .progress-bar is an element inside the <progressmeter> implementation. */
michael@0 140 .bufferBar .progress-bar {
michael@0 141 /*
michael@0 142 * Note that this is drawn on top of the .backgroundBar. So although this
michael@0 143 * has the same background-color specified, the semitransparent
michael@0 144 * compositing gives it a different visual appearance.
michael@0 145 */
michael@0 146 background-color: rgba(255,255,255,.5);
michael@0 147 border-radius: 2.5px;
michael@0 148 }
michael@0 149
michael@0 150 .progressBar .progress-bar {
michael@0 151 background-color: white;
michael@0 152 border-radius: 2.5px;
michael@0 153 }
michael@0 154
michael@0 155 /* .scale-slider is an element inside the <scale> implementation. */
michael@0 156 .scrubber .scale-slider,
michael@0 157 .volumeControl .scale-slider {
michael@0 158 /* Hide the default horizontal bar. */
michael@0 159 -moz-appearance: none;
michael@0 160 background: none;
michael@0 161 margin: 0;
michael@0 162 }
michael@0 163
michael@0 164 .scrubber .scale-slider {
michael@0 165 /* abs(margin-top) + margin-bottom + bar height == timeThumb height */
michael@0 166 margin-top: -10px;
michael@0 167 margin-bottom: 10px;
michael@0 168 }
michael@0 169 /* .scale-thumb is an element inside the <scale> implementation. */
michael@0 170 .scrubber .scale-thumb {
michael@0 171 /* Override the default thumb appearance with a custom image. */
michael@0 172 -moz-appearance: none;
michael@0 173 background: transparent;
michael@0 174 border: none;
michael@0 175 }
michael@0 176
michael@0 177 .timeThumb {
michael@0 178 background: url(chrome://global/skin/media/scrubberThumb.png) no-repeat center;
michael@0 179 min-width: 45px;
michael@0 180 min-height: 28px;
michael@0 181 -moz-box-pack: center;
michael@0 182 }
michael@0 183
michael@0 184 .timeThumb[showhours="true"] {
michael@0 185 background-image: url(chrome://global/skin/media/scrubberThumbWide.png);
michael@0 186 }
michael@0 187
michael@0 188 .timeLabel {
michael@0 189 color: rgba(255,255,255,.75);
michael@0 190 font-size: 10px;
michael@0 191 font-family: Helvetica, sans-serif;
michael@0 192 text-shadow: rgba(0,0,0,.3) 0 1px;
michael@0 193 padding-top: 7px;
michael@0 194 }
michael@0 195
michael@0 196 .statusOverlay {
michael@0 197 -moz-box-align: center;
michael@0 198 -moz-box-pack: center;
michael@0 199 background-color: rgba(0,0,0,.55);
michael@0 200 }
michael@0 201
michael@0 202 .statusIcon {
michael@0 203 margin-bottom: 28px; /* same height as .controlBar, to keep icon centered above it */
michael@0 204 width: 36px;
michael@0 205 height: 36px;
michael@0 206 }
michael@0 207
michael@0 208 .statusIcon[type="throbber"] {
michael@0 209 background: url(chrome://global/skin/media/throbber.png) no-repeat center;
michael@0 210 }
michael@0 211
michael@0 212 .statusIcon[type="throbber"][stalled] {
michael@0 213 background: url(chrome://global/skin/media/stalled.png) no-repeat center;
michael@0 214 }
michael@0 215
michael@0 216 .statusIcon[type="error"] {
michael@0 217 background: url(chrome://global/skin/media/error.png) no-repeat center;
michael@0 218 }
michael@0 219
michael@0 220 /* Overlay Play button */
michael@0 221 .clickToPlay {
michael@0 222 width: 64px;
michael@0 223 height: 64px;
michael@0 224 -moz-box-pack: center;
michael@0 225 -moz-box-align: center;
michael@0 226 opacity: 0.7;
michael@0 227 background-image: url(chrome://global/skin/media/clicktoplay-bgtexture.png),
michael@0 228 url(chrome://global/skin/media/videoClickToPlayButton.svg);
michael@0 229 background-repeat: repeat, no-repeat;
michael@0 230 background-position: center, center;
michael@0 231 background-size: auto, 64px 64px;
michael@0 232 background-color: hsla(0,0%,10%,.5);
michael@0 233 }
michael@0 234 .clickToPlay:hover {
michael@0 235 opacity: 1;
michael@0 236 }
michael@0 237
michael@0 238 /* Statistics formatting */
michael@0 239 html|*.statsDiv {
michael@0 240 position: relative;
michael@0 241 }
michael@0 242 html|td {
michael@0 243 height: 1em;
michael@0 244 max-height: 1em;
michael@0 245 padding: 0 2px;
michael@0 246 }
michael@0 247 html|table {
michael@0 248 font-family: Helvetica, Arial, sans-serif;
michael@0 249 font-size: 11px;
michael@0 250 color: white;
michael@0 251 text-shadow:
michael@0 252 -1px -1px 0 #000,
michael@0 253 1px -1px 0 #000,
michael@0 254 -1px 1px 0 #000,
michael@0 255 1px 1px 0 #000;
michael@0 256 min-width: 100%;
michael@0 257 background: rgba(68,68,68,.7);
michael@0 258 table-layout: fixed;
michael@0 259 border-collapse: collapse;
michael@0 260 position: absolute;
michael@0 261 }
michael@0 262
michael@0 263 /* CSS Transitions */
michael@0 264 .clickToPlay {
michael@0 265 transition-property: opacity, background-size;
michael@0 266 transition-duration: 400ms, 400ms;
michael@0 267 }
michael@0 268 .clickToPlay[fadeout] {
michael@0 269 background-size: auto, 192px 192px;
michael@0 270 opacity: 0;
michael@0 271 }
michael@0 272 .clickToPlay[fadeout][immediate] {
michael@0 273 transition-property: opacity, background-size;
michael@0 274 transition-duration: 0s, 0s;
michael@0 275 }
michael@0 276 .controlBar:not([immediate]) {
michael@0 277 transition-property: opacity;
michael@0 278 transition-duration: 200ms;
michael@0 279 }
michael@0 280 .controlBar[fadeout] {
michael@0 281 opacity: 0;
michael@0 282 }
michael@0 283 .volumeStack:not([immediate]) {
michael@0 284 transition-property: opacity, margin-top;
michael@0 285 transition-duration: 200ms, 200ms;
michael@0 286 }
michael@0 287 .volumeStack[fadeout] {
michael@0 288 opacity: 0;
michael@0 289 margin-top: 0;
michael@0 290 }
michael@0 291 .statusOverlay:not([immediate]) {
michael@0 292 transition-property: opacity;
michael@0 293 transition-duration: 300ms;
michael@0 294 transition-delay: 750ms;
michael@0 295 }
michael@0 296 .statusOverlay[fadeout] {
michael@0 297 opacity: 0;
michael@0 298 }
michael@0 299
michael@0 300 /* Error description formatting */
michael@0 301 .errorLabel {
michael@0 302 font-family: Helvetica, Arial, sans-serif;
michael@0 303 font-size: 11px;
michael@0 304 color: #bbb;
michael@0 305 text-shadow:
michael@0 306 -1px -1px 0 #000,
michael@0 307 1px -1px 0 #000,
michael@0 308 -1px 1px 0 #000,
michael@0 309 1px 1px 0 #000;
michael@0 310 padding: 0 10px;
michael@0 311 text-align: center;
michael@0 312 }
michael@0 313
michael@0 314 @media (min-resolution: 2dppx) {
michael@0 315 .playButton {
michael@0 316 background-image: url(chrome://global/skin/media/pauseButton@2x.png);
michael@0 317 background-size: 28px 28px;
michael@0 318 }
michael@0 319 .playButton[paused] {
michael@0 320 background-image: url(chrome://global/skin/media/playButton@2x.png);
michael@0 321 background-size: 28px 28px;
michael@0 322 }
michael@0 323 .volumeBackground {
michael@0 324 background-image: url(chrome://global/skin/media/volume-empty@2x.png);
michael@0 325 background-size: 32px 16px;
michael@0 326 }
michael@0 327 .volumeForeground {
michael@0 328 background-image: url(chrome://global/skin/media/volume-full@2x.png);
michael@0 329 background-size: 32px 16px;
michael@0 330 }
michael@0 331 .muteButton {
michael@0 332 background-image: url(chrome://global/skin/media/muteButton@2x.png);
michael@0 333 background-size: 33px 28px;
michael@0 334 }
michael@0 335 .muteButton[muted] {
michael@0 336 background-image: url(chrome://global/skin/media/unmuteButton@2x.png);
michael@0 337 background-size: 33px 28px;
michael@0 338 }
michael@0 339 .muteButton[noAudio] {
michael@0 340 background-image: url(chrome://global/skin/media/noAudio@2x.png);
michael@0 341 background-size: 33px 28px;
michael@0 342 }
michael@0 343 .fullscreenButton {
michael@0 344 background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton@2x.png"), 0, 32, 32, 0);
michael@0 345 background-size: 16px 16px;
michael@0 346 }
michael@0 347 .fullscreenButton[fullscreened] {
michael@0 348 background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton@2x.png"), 0, 64, 32, 32);
michael@0 349 background-size: 16px 16px;
michael@0 350 }
michael@0 351 .timeThumb {
michael@0 352 background-image: url(chrome://global/skin/media/scrubberThumb@2x.png);
michael@0 353 background-size: 33px 28px;
michael@0 354 }
michael@0 355 .timeThumb[showhours="true"] {
michael@0 356 background-image: url(chrome://global/skin/media/scrubberThumbWide@2x.png);
michael@0 357 background-size: 45px 28px;
michael@0 358 }
michael@0 359 }

mercurial