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.w3.org/1999/xhtml"); michael@0: @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); michael@0: michael@0: /* Style the scrollbars */ michael@0: xul|window xul|scrollbar { michael@0: display: none; michael@0: } michael@0: michael@0: html xul|scrollbar[root="true"] { michael@0: position: relative; michael@0: z-index: 2147483647; michael@0: } michael@0: michael@0: html xul|scrollbar { michael@0: -moz-appearance: none !important; michael@0: background-color: transparent !important; michael@0: background-image: none !important; michael@0: border: 0px solid transparent !important; michael@0: pointer-events: none; michael@0: opacity: 1; michael@0: } michael@0: michael@0: xul|scrollbar[orient="vertical"] { michael@0: -moz-margin-start: -8px; michael@0: min-width: 8px; michael@0: max-width: 8px; michael@0: } michael@0: michael@0: xul|scrollbar[orient="vertical"] xul|thumb { michael@0: max-width: 6px !important; michael@0: min-width: 6px !important; michael@0: } michael@0: michael@0: xul|scrollbar[orient="horizontal"] { michael@0: margin-top: -8px; michael@0: min-height: 8px; michael@0: max-height: 8px; michael@0: } michael@0: michael@0: xul|scrollbar[orient="horizontal"] xul|thumb { michael@0: max-height: 6px !important; michael@0: min-height: 6px !important; michael@0: } michael@0: michael@0: xul|scrollbar:not([active="true"]), michael@0: xul|scrollbar[disabled] { michael@0: opacity: 0; michael@0: transition: opacity 1s ease; michael@0: } michael@0: michael@0: xul|scrollbarbutton { michael@0: min-height: 8px !important; michael@0: min-width: 8px !important; michael@0: -moz-appearance: none !important; michael@0: visibility: hidden; michael@0: } michael@0: michael@0: xul|scrollbarbutton[sbattr="scrollbar-up-top"], michael@0: xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] { michael@0: display: none; michael@0: } michael@0: michael@0: xul|thumb { michael@0: background-color: rgba(0, 0, 0, 0.4) !important; michael@0: -moz-border-top-colors: none !important; michael@0: -moz-border-bottom-colors: none !important; michael@0: -moz-border-right-colors: none !important; michael@0: -moz-border-left-colors: none !important; michael@0: border: 1px solid rgba(255, 255, 255, 0.4) !important; michael@0: border-radius: 3px; michael@0: } michael@0: michael@0: xul|scrollbarbutton { michael@0: background-image: none !important; michael@0: } michael@0: michael@0: /* -moz-touch-enabled? media elements */ michael@0: :-moz-any(video, audio) > xul|videocontrols { michael@0: -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControls"); michael@0: } michael@0: michael@0: select:not([size]):not([multiple]) > xul|scrollbar, michael@0: select[size="1"] > xul|scrollbar, michael@0: select:not([size]):not([multiple]) xul|scrollbarbutton, michael@0: select[size="1"] xul|scrollbarbutton { michael@0: display: block; michael@0: margin-left: 0; michael@0: min-width: 16px; michael@0: } michael@0: michael@0: /* Override inverse OS themes */ michael@0: select, michael@0: textarea, michael@0: button, michael@0: xul|button, michael@0: * > input:not([type="image"]) { michael@0: -moz-appearance: none !important; /* See bug 598421 for fixing the platform */ michael@0: border-radius: 3px; michael@0: } michael@0: michael@0: select[size], michael@0: select[multiple], michael@0: select[size][multiple], michael@0: textarea, michael@0: * > input:not([type="image"]) { michael@0: border-style: solid; michael@0: border-color: #7d7d7d; michael@0: color: #414141; michael@0: background: white linear-gradient(rgba(115,115,115,0.5) 0, rgba(215,215,215,0.5) 3px, rgba(255,255,255,0.2) 16px); michael@0: } michael@0: michael@0: /* Selects are handled by the form helper, see bug 685197 */ michael@0: select option, select optgroup { michael@0: pointer-events: none; michael@0: } michael@0: michael@0: select:not([size]):not([multiple]), michael@0: select[size="0"], michael@0: select[size="1"], michael@0: * > input[type="button"], michael@0: * > input[type="submit"], michael@0: * > input[type="reset"], michael@0: button { michael@0: border-style: solid; michael@0: border-color: #7d7d7d; michael@0: color: #414141; michael@0: background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(215,215,215,0.5) 18px, rgba(115,115,115,0.5) 100%); michael@0: } michael@0: michael@0: input[type="checkbox"] { michael@0: background: white linear-gradient(rgba(115,115,115,0.5) 0, rgba(215,215,215,0.5) 2px, rgba(255,255,255,0.2) 6px); michael@0: } michael@0: michael@0: input[type="radio"] { michael@0: background: radial-gradient(at 6px 6px, rgba(255,255,255,0.2) 3px, rgba(195,195,195,0.5) 5px, rgba(115,115,115,0.5) 100%); michael@0: } michael@0: michael@0: select { michael@0: border-width: 1px; michael@0: padding: 1px; michael@0: } michael@0: michael@0: select:not([size]):not([multiple]), michael@0: select[size="0"], michael@0: select[size="1"] { michael@0: padding: 0 1px 0 1px; michael@0: } michael@0: michael@0: * > input:not([type="image"]) { michael@0: border-width: 1px; michael@0: padding: 1px; michael@0: } michael@0: michael@0: textarea { michael@0: resize: none; michael@0: border-width: 1px; michael@0: padding: 2px 1px 2px 1px; michael@0: } michael@0: michael@0: input[type="button"], michael@0: input[type="submit"], michael@0: input[type="reset"], michael@0: button { michael@0: border-width: 1px; michael@0: padding: 0 7px 0 7px; michael@0: } michael@0: michael@0: input[type="radio"], michael@0: input[type="checkbox"] { michael@0: max-width: 14px; michael@0: max-height: 14px; michael@0: border: 1px solid #a7a7a7 !important; michael@0: padding: 2px 1px 2px 1px; michael@0: } michael@0: michael@0: select > button { michael@0: border-width: 0px !important; michael@0: margin: 0px !important; michael@0: padding: 0px !important; michael@0: border-radius: 0; michael@0: color: #414141; michael@0: michael@0: background-image: radial-gradient(at bottom left, #bbbbbb 40%, #f5f5f5), url(arrow.svg) !important; michael@0: background-color: transparent; michael@0: background-position: -15px center, 4px center !important; michael@0: background-repeat: no-repeat, no-repeat !important; michael@0: background-size: 100% 90%, auto auto; michael@0: michael@0: -moz-binding: none !important; michael@0: position: relative !important; michael@0: font-size: inherit; michael@0: } michael@0: michael@0: select[size]:focus, michael@0: select[multiple]:focus, michael@0: select[size][multiple]:focus, michael@0: textarea:focus, michael@0: input[type="file"]:focus > input[type="text"], michael@0: * > input:not([type="image"]):focus { michael@0: outline: 0px !important; michael@0: border-style: solid; michael@0: border-color: rgb(94,128,153); michael@0: background: white linear-gradient(rgba(27,113,177,0.5) 0, rgba(198,225,246,0.2) 3px, rgba(255,255,255,0.2) 16px); michael@0: } michael@0: michael@0: select:not([size]):not([multiple]):focus, michael@0: select[size="0"]:focus, michael@0: select[size="1"]:focus, michael@0: input[type="button"]:focus, michael@0: input[type="submit"]:focus, michael@0: input[type="reset"]:focus, michael@0: button:focus { michael@0: outline: 0px !important; michael@0: border-style: solid; michael@0: border-color: rgb(94,128,153); michael@0: background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(198,225,256,0.2) 18px, rgba(27,113,177,0.5) 100%); michael@0: } michael@0: michael@0: input[type="checkbox"]:focus, michael@0: input[type="radio"]:focus { michael@0: border-color: #99c6e0 !important; michael@0: } michael@0: michael@0: input[type="checkbox"]:focus { michael@0: background: white linear-gradient(rgba(27,113,177,0.5) 0, rgba(198,225,246,0.2) 2px, rgba(255,255,255,0.2) 6px); michael@0: } michael@0: michael@0: input[type="radio"]:focus { michael@0: background: radial-gradient(at 6px 6px, rgba(255,255,255,0.2) 3px, rgba(198,225,246,0.2) 5px, rgba(27,113,177,0.5) 100%); michael@0: } michael@0: michael@0: /* we need to be specific for selects because the above rules are specific too */ michael@0: textarea[disabled], michael@0: select[size][disabled], michael@0: select[multiple][disabled], michael@0: select[size][multiple][disabled], michael@0: select:not([size]):not([multiple])[disabled], michael@0: select[size="0"][disabled], michael@0: select[size="1"][disabled], michael@0: button[disabled], michael@0: * > input:not([type="image"])[disabled] { michael@0: color: rgba(0,0,0,0.3); michael@0: border-color: rgba(125,125,125,0.4); michael@0: border-style: solid; michael@0: border-width: 1px; michael@0: background: transparent linear-gradient(rgba(185,185,185,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(255,255,255,0.4) 100%); michael@0: } michael@0: michael@0: select:not([size]):not([multiple])[disabled], michael@0: select[size="0"][disabled], michael@0: select[size="1"][disabled] { michael@0: background: transparent linear-gradient(rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%); michael@0: } michael@0: michael@0: input[type="button"][disabled], michael@0: input[type="submit"][disabled], michael@0: input[type="reset"][disabled], michael@0: button[disabled="true"] { michael@0: padding: 0 7px 0 7px; michael@0: background: transparent linear-gradient(rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%); michael@0: } michael@0: michael@0: input[type="radio"][disabled], michael@0: input[type="radio"][disabled]:active, michael@0: input[type="radio"][disabled]:hover, michael@0: input[type="radio"][disabled]:hover:active, michael@0: input[type="checkbox"][disabled], michael@0: input[type="checkbox"][disabled]:active, michael@0: input[type="checkbox"][disabled]:hover, michael@0: input[type="checkbox"][disabled]:hover:active { michael@0: border:1px solid rgba(125,125,125,0.4) !important; michael@0: } michael@0: michael@0: select[disabled] > button { michael@0: opacity: 0.6; michael@0: padding: 1px 7px 1px 7px; michael@0: } michael@0: michael@0: *:-moz-any-link:active, michael@0: *[role=button]:active, michael@0: button:active, michael@0: input:active, michael@0: option:active, michael@0: select:active, michael@0: label:active, michael@0: textarea:active { michael@0: background-color: rgba(141, 184, 216, 0.5); michael@0: } michael@0: michael@0: input[type=number] > div > div, /* work around bug 946184 */ michael@0: input[type=number]::-moz-number-spin-box { michael@0: display: none; michael@0: } michael@0: michael@0: %ifdef MOZ_WIDGET_GONK michael@0: /* This binding only provide key shortcuts that we can't use on devices */ michael@0: input, michael@0: textarea { michael@0: -moz-binding: none !important; michael@0: } michael@0: %endif