michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); michael@0: @namespace html url("http://www.w3.org/1999/xhtml"); michael@0: michael@0: .controlBar { michael@0: height: 28px; michael@0: background-color: rgba(35,31,32,.74); michael@0: } michael@0: michael@0: .playButton, michael@0: .muteButton, michael@0: .fullscreenButton { michael@0: background-color: transparent; michael@0: background-repeat: no-repeat; michael@0: background-position: center; michael@0: -moz-appearance: none; /* Remove the native button appearance and styling */ michael@0: margin: 0; michael@0: padding: 0; michael@0: min-height: 28px; michael@0: min-width: 28px; michael@0: border: none; michael@0: opacity: 0.7; michael@0: } michael@0: michael@0: .playButton:hover, michael@0: .muteButton:hover, michael@0: .fullscreenButton:hover { michael@0: opacity: 1; michael@0: } michael@0: michael@0: .playButton:hover:active, michael@0: .muteButton:hover:active, michael@0: .fullscreenButton:hover:active { michael@0: opacity: 0.4; michael@0: } michael@0: michael@0: .playButton { michael@0: background-image: url(chrome://global/skin/media/pauseButton.png); michael@0: margin-right: -22px; /* 1/2 of scrubber thumb width, for overhang. */ michael@0: position: relative; /* Trick to work around negative margin interfering with clicking on the button. */ michael@0: } michael@0: michael@0: .playButton[paused] { michael@0: background-image: url(chrome://global/skin/media/playButton.png); michael@0: } michael@0: michael@0: .muteButton { michael@0: background-image: url(chrome://global/skin/media/muteButton.png); michael@0: min-width: 33px; michael@0: } michael@0: .muteButton[muted] { michael@0: background-image: url(chrome://global/skin/media/unmuteButton.png); michael@0: } michael@0: michael@0: .muteButton[noAudio] { michael@0: background-image: url(chrome://global/skin/media/noAudio.png); michael@0: } michael@0: michael@0: .muteButton[noAudio] + .volumeStack { michael@0: display: none; michael@0: } michael@0: michael@0: .fullscreenButton { michael@0: background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton.png"), 0, 16, 16, 0); michael@0: } michael@0: michael@0: .fullscreenButton[fullscreened] { michael@0: background-image: -moz-image-rect(url("chrome://global/skin/media/fullscreenButton.png"), 0, 32, 16, 16); michael@0: } michael@0: michael@0: .volumeControl { michael@0: width: 32px; michael@0: opacity: 0; michael@0: } michael@0: michael@0: .volumeBackground, michael@0: .volumeForeground { michael@0: background-repeat: no-repeat; michael@0: background-position: center; michael@0: width: 32px; michael@0: } michael@0: michael@0: .volumeBackground { michael@0: background-image: url(chrome://global/skin/media/volume-empty.png); michael@0: } michael@0: michael@0: .volumeForeground { michael@0: background-image: url(chrome://global/skin/media/volume-full.png); michael@0: background-clip: content-box; michael@0: } michael@0: michael@0: .controlBar[audio-only] > .volumeStack { michael@0: /* This value is duplicated in the videocontrols.xml adjustControlSize function. */ michael@0: -moz-margin-end: 8px; michael@0: } michael@0: michael@0: .volumeControl .scale-thumb { michael@0: min-width: 0; michael@0: opacity: 0; michael@0: } michael@0: michael@0: .durationBox { michael@0: -moz-box-pack: center; michael@0: } michael@0: michael@0: .durationLabel { michael@0: margin-left: -22px; /* 1/2 of scrubber thumb width, for overhang. */ michael@0: padding-left: 8px; /* don't bump into the scrubber bar */ michael@0: padding-top: 0; /* center vertically with scrubber bar */ michael@0: color: rgba(255,255,255,.75); michael@0: font-size: 11px; michael@0: font-family: Arial, sans-serif; michael@0: } michael@0: michael@0: .positionLabel { michael@0: display: none; michael@0: } michael@0: michael@0: .backgroundBar { michael@0: /* margin top/bottom: make bar 8px tall (control height = 28, minus 2 * 10 margin) */ michael@0: /* margin left/right: 1/2 of scrubber thumb width, for overhang. */ michael@0: margin: 10px 22px; michael@0: background-color: rgba(255,255,255,.5); michael@0: border-radius: 2.5px; michael@0: } michael@0: michael@0: .bufferBar, michael@0: .progressBar { michael@0: /* margin top/bottom: make bar 8px tall (control height = 28, minus 2 * 10 margin) */ michael@0: /* margin left/right: 1/2 of scrubber thumb width, for overhang. */ michael@0: margin: 10px 22px; michael@0: -moz-appearance: none; michael@0: border: none; michael@0: background-color: transparent; michael@0: min-width: 0; michael@0: min-height: 0; michael@0: } michael@0: michael@0: /* .progress-bar is an element inside the implementation. */ michael@0: .bufferBar .progress-bar { michael@0: /* michael@0: * Note that this is drawn on top of the .backgroundBar. So although this michael@0: * has the same background-color specified, the semitransparent michael@0: * compositing gives it a different visual appearance. michael@0: */ michael@0: background-color: rgba(255,255,255,.5); michael@0: border-radius: 2.5px; michael@0: -moz-appearance: none; michael@0: } michael@0: michael@0: .progressBar .progress-bar { michael@0: background-color: white; michael@0: border-radius: 2.5px; michael@0: -moz-appearance: none; michael@0: } michael@0: michael@0: /* .scale-slider is an element inside the implementation. */ michael@0: .scrubber .scale-slider, michael@0: .volumeControl .scale-slider { michael@0: /* Hide the default horizontal bar. */ michael@0: -moz-appearance: none; michael@0: background: none; michael@0: margin: 0; michael@0: } michael@0: michael@0: .scrubber .scale-slider { michael@0: /* abs(margin-top) + margin-bottom + bar height == timeThumb height */ michael@0: margin-top: -10px; michael@0: margin-bottom: 10px; michael@0: } michael@0: michael@0: /* .scale-thumb is an element inside the implementation. */ michael@0: .scrubber .scale-thumb, michael@0: .volumeControl .scale-thumb { michael@0: /* Override the default thumb appearance with a custom image. */ michael@0: -moz-appearance: none; michael@0: background: transparent; michael@0: border: none; michael@0: } michael@0: michael@0: .timeThumb { michael@0: background: url(chrome://global/skin/media/scrubberThumb.png) no-repeat center; michael@0: min-width: 45px; michael@0: min-height: 28px; michael@0: -moz-box-pack: center; michael@0: } michael@0: michael@0: .timeThumb[showhours="true"] { michael@0: background-image: url(chrome://global/skin/media/scrubberThumbWide.png); michael@0: } michael@0: michael@0: .timeLabel { michael@0: color: rgba(255,255,255,.75); michael@0: font-size: 10px; michael@0: font-family: Arial, sans-serif; michael@0: text-shadow: rgba(0,0,0,.3) 0 1px; michael@0: padding-top: 5px; michael@0: } michael@0: michael@0: .statusOverlay { michael@0: -moz-box-align: center; michael@0: -moz-box-pack: center; michael@0: background-color: rgba(0,0,0,.55); michael@0: } michael@0: michael@0: .statusIcon { michael@0: margin-bottom: 28px; /* same height as .controlBar, to keep icon centered above it */ michael@0: width: 36px; michael@0: height: 36px; michael@0: } michael@0: michael@0: .statusIcon[type="throbber"] { michael@0: background: url(chrome://global/skin/media/throbber.png) no-repeat center; michael@0: } michael@0: michael@0: .statusIcon[type="throbber"][stalled] { michael@0: background: url(chrome://global/skin/media/stalled.png) no-repeat center; michael@0: } michael@0: michael@0: .statusIcon[type="error"] { michael@0: background: url(chrome://global/skin/media/error.png) no-repeat center; michael@0: } michael@0: michael@0: /* Overlay Play button */ michael@0: .clickToPlay { michael@0: width: 64px; michael@0: height: 64px; michael@0: -moz-box-pack: center; michael@0: -moz-box-align: center; michael@0: opacity: 0.7; michael@0: background-image: url(chrome://global/skin/media/clicktoplay-bgtexture.png), michael@0: url(chrome://global/skin/media/videoClickToPlayButton.svg); michael@0: background-repeat: repeat, no-repeat; michael@0: background-position: center, center; michael@0: background-size: auto, 64px 64px; michael@0: background-color: hsla(0,0%,10%,.5); michael@0: } michael@0: .clickToPlay:hover { michael@0: opacity: 1; michael@0: } michael@0: michael@0: /* Statistics formatting */ michael@0: html|*.statsDiv { michael@0: position: relative; michael@0: } michael@0: html|td { michael@0: height: 1em; michael@0: max-height: 1em; michael@0: padding: 0 2px; michael@0: } michael@0: html|table { michael@0: font-family: Helvetica, Arial, sans-serif; michael@0: font-size: 11px; michael@0: color: white; michael@0: text-shadow: michael@0: -1px -1px 0 #000, michael@0: 1px -1px 0 #000, michael@0: -1px 1px 0 #000, michael@0: 1px 1px 0 #000; michael@0: min-width: 100%; michael@0: background: rgba(68,68,68,.7); michael@0: table-layout: fixed; michael@0: border-collapse: collapse; michael@0: position: absolute; michael@0: } michael@0: michael@0: /* CSS Transitions */ michael@0: .clickToPlay { michael@0: transition-property: opacity, background-size; michael@0: transition-duration: 400ms, 400ms; michael@0: } michael@0: .clickToPlay[fadeout] { michael@0: background-size: auto, 192px 192px; michael@0: opacity: 0; michael@0: } michael@0: .clickToPlay[fadeout][immediate] { michael@0: transition-property: opacity, background-size; michael@0: transition-duration: 0s, 0s; michael@0: } michael@0: .controlBar:not([immediate]) { michael@0: transition-property: opacity; michael@0: transition-duration: 200ms; michael@0: } michael@0: .controlBar[fadeout] { michael@0: opacity: 0; michael@0: } michael@0: .volumeStack:not([immediate]) { michael@0: transition-property: opacity, margin-top; michael@0: transition-duration: 200ms, 200ms; michael@0: } michael@0: .volumeStack[fadeout] { michael@0: opacity: 0; michael@0: margin-top: 0; michael@0: } michael@0: .statusOverlay:not([immediate]) { michael@0: transition-property: opacity; michael@0: transition-duration: 300ms; michael@0: transition-delay: 750ms; michael@0: } michael@0: .statusOverlay[fadeout] { michael@0: opacity: 0; michael@0: } michael@0: michael@0: /* Error description formatting */ michael@0: .errorLabel { michael@0: font-family: Helvetica, Arial, sans-serif; michael@0: font-size: 11px; michael@0: color: #bbb; michael@0: text-shadow: michael@0: -1px -1px 0 #000, michael@0: 1px -1px 0 #000, michael@0: -1px 1px 0 #000, michael@0: 1px 1px 0 #000; michael@0: padding: 0 10px; michael@0: text-align: center; michael@0: }