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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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: 0; /* 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: Arial, 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 border: none;
michael@0 137 background-color: transparent;
michael@0 138 min-width: 0;
michael@0 139 min-height: 0;
michael@0 140 }
michael@0 141
michael@0 142 /* .progress-bar is an element inside the <progressmeter> implementation. */
michael@0 143 .bufferBar .progress-bar {
michael@0 144 /*
michael@0 145 * Note that this is drawn on top of the .backgroundBar. So although this
michael@0 146 * has the same background-color specified, the semitransparent
michael@0 147 * compositing gives it a different visual appearance.
michael@0 148 */
michael@0 149 background-color: rgba(255,255,255,.5);
michael@0 150 border-radius: 2.5px;
michael@0 151 -moz-appearance: none;
michael@0 152 }
michael@0 153
michael@0 154 .progressBar .progress-bar {
michael@0 155 background-color: white;
michael@0 156 border-radius: 2.5px;
michael@0 157 -moz-appearance: none;
michael@0 158 }
michael@0 159
michael@0 160 /* .scale-slider is an element inside the <scale> implementation. */
michael@0 161 .scrubber .scale-slider,
michael@0 162 .volumeControl .scale-slider {
michael@0 163 /* Hide the default horizontal bar. */
michael@0 164 -moz-appearance: none;
michael@0 165 background: none;
michael@0 166 margin: 0;
michael@0 167 }
michael@0 168
michael@0 169 .scrubber .scale-slider {
michael@0 170 /* abs(margin-top) + margin-bottom + bar height == timeThumb height */
michael@0 171 margin-top: -10px;
michael@0 172 margin-bottom: 10px;
michael@0 173 }
michael@0 174
michael@0 175 /* .scale-thumb is an element inside the <scale> implementation. */
michael@0 176 .scrubber .scale-thumb,
michael@0 177 .volumeControl .scale-thumb {
michael@0 178 /* Override the default thumb appearance with a custom image. */
michael@0 179 -moz-appearance: none;
michael@0 180 background: transparent;
michael@0 181 border: none;
michael@0 182 }
michael@0 183
michael@0 184 .timeThumb {
michael@0 185 background: url(chrome://global/skin/media/scrubberThumb.png) no-repeat center;
michael@0 186 min-width: 45px;
michael@0 187 min-height: 28px;
michael@0 188 -moz-box-pack: center;
michael@0 189 }
michael@0 190
michael@0 191 .timeThumb[showhours="true"] {
michael@0 192 background-image: url(chrome://global/skin/media/scrubberThumbWide.png);
michael@0 193 }
michael@0 194
michael@0 195 .timeLabel {
michael@0 196 color: rgba(255,255,255,.75);
michael@0 197 font-size: 10px;
michael@0 198 font-family: Arial, sans-serif;
michael@0 199 text-shadow: rgba(0,0,0,.3) 0 1px;
michael@0 200 padding-top: 5px;
michael@0 201 }
michael@0 202
michael@0 203 .statusOverlay {
michael@0 204 -moz-box-align: center;
michael@0 205 -moz-box-pack: center;
michael@0 206 background-color: rgba(0,0,0,.55);
michael@0 207 }
michael@0 208
michael@0 209 .statusIcon {
michael@0 210 margin-bottom: 28px; /* same height as .controlBar, to keep icon centered above it */
michael@0 211 width: 36px;
michael@0 212 height: 36px;
michael@0 213 }
michael@0 214
michael@0 215 .statusIcon[type="throbber"] {
michael@0 216 background: url(chrome://global/skin/media/throbber.png) no-repeat center;
michael@0 217 }
michael@0 218
michael@0 219 .statusIcon[type="throbber"][stalled] {
michael@0 220 background: url(chrome://global/skin/media/stalled.png) no-repeat center;
michael@0 221 }
michael@0 222
michael@0 223 .statusIcon[type="error"] {
michael@0 224 background: url(chrome://global/skin/media/error.png) no-repeat center;
michael@0 225 }
michael@0 226
michael@0 227 /* Overlay Play button */
michael@0 228 .clickToPlay {
michael@0 229 width: 64px;
michael@0 230 height: 64px;
michael@0 231 -moz-box-pack: center;
michael@0 232 -moz-box-align: center;
michael@0 233 opacity: 0.7;
michael@0 234 background-image: url(chrome://global/skin/media/clicktoplay-bgtexture.png),
michael@0 235 url(chrome://global/skin/media/videoClickToPlayButton.svg);
michael@0 236 background-repeat: repeat, no-repeat;
michael@0 237 background-position: center, center;
michael@0 238 background-size: auto, 64px 64px;
michael@0 239 background-color: hsla(0,0%,10%,.5);
michael@0 240 }
michael@0 241 .clickToPlay:hover {
michael@0 242 opacity: 1;
michael@0 243 }
michael@0 244
michael@0 245 /* Statistics formatting */
michael@0 246 html|*.statsDiv {
michael@0 247 position: relative;
michael@0 248 }
michael@0 249 html|td {
michael@0 250 height: 1em;
michael@0 251 max-height: 1em;
michael@0 252 padding: 0 2px;
michael@0 253 }
michael@0 254 html|table {
michael@0 255 font-family: Helvetica, Arial, sans-serif;
michael@0 256 font-size: 11px;
michael@0 257 color: white;
michael@0 258 text-shadow:
michael@0 259 -1px -1px 0 #000,
michael@0 260 1px -1px 0 #000,
michael@0 261 -1px 1px 0 #000,
michael@0 262 1px 1px 0 #000;
michael@0 263 min-width: 100%;
michael@0 264 background: rgba(68,68,68,.7);
michael@0 265 table-layout: fixed;
michael@0 266 border-collapse: collapse;
michael@0 267 position: absolute;
michael@0 268 }
michael@0 269
michael@0 270 /* CSS Transitions */
michael@0 271 .clickToPlay {
michael@0 272 transition-property: opacity, background-size;
michael@0 273 transition-duration: 400ms, 400ms;
michael@0 274 }
michael@0 275 .clickToPlay[fadeout] {
michael@0 276 background-size: auto, 192px 192px;
michael@0 277 opacity: 0;
michael@0 278 }
michael@0 279 .clickToPlay[fadeout][immediate] {
michael@0 280 transition-property: opacity, background-size;
michael@0 281 transition-duration: 0s, 0s;
michael@0 282 }
michael@0 283 .controlBar:not([immediate]) {
michael@0 284 transition-property: opacity;
michael@0 285 transition-duration: 200ms;
michael@0 286 }
michael@0 287 .controlBar[fadeout] {
michael@0 288 opacity: 0;
michael@0 289 }
michael@0 290 .volumeStack:not([immediate]) {
michael@0 291 transition-property: opacity, margin-top;
michael@0 292 transition-duration: 200ms, 200ms;
michael@0 293 }
michael@0 294 .volumeStack[fadeout] {
michael@0 295 opacity: 0;
michael@0 296 margin-top: 0;
michael@0 297 }
michael@0 298 .statusOverlay:not([immediate]) {
michael@0 299 transition-property: opacity;
michael@0 300 transition-duration: 300ms;
michael@0 301 transition-delay: 750ms;
michael@0 302 }
michael@0 303 .statusOverlay[fadeout] {
michael@0 304 opacity: 0;
michael@0 305 }
michael@0 306
michael@0 307 /* Error description formatting */
michael@0 308 .errorLabel {
michael@0 309 font-family: Helvetica, Arial, sans-serif;
michael@0 310 font-size: 11px;
michael@0 311 color: #bbb;
michael@0 312 text-shadow:
michael@0 313 -1px -1px 0 #000,
michael@0 314 1px -1px 0 #000,
michael@0 315 -1px 1px 0 #000,
michael@0 316 1px 1px 0 #000;
michael@0 317 padding: 0 10px;
michael@0 318 text-align: center;
michael@0 319 }

mercurial