1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/themes/linux/global/checkbox.css Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,99 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +/* ===== checkbox.css =================================================== 1.9 + == Styles used by the XUL checkbox element. 1.10 + ======================================================================= */ 1.11 + 1.12 +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 1.13 + 1.14 +/* ::::: checkbox ::::: */ 1.15 + 1.16 +checkbox { 1.17 + -moz-appearance: checkbox-container; 1.18 + margin: 2px 4px; 1.19 + border-left: 2px transparent; 1.20 + border-right: 2px transparent; 1.21 +} 1.22 + 1.23 +/* With native theming on, the spacer-box paints the check mark and includes 1.24 + the spacing to the right, so that oversized checkbox images can slop over 1.25 + into the space. 1.26 + 1.27 + If we need to disable checkbox theming, the spacer box no longer paints 1.28 + the check mark, but its fallback CSS border supplies the padding between 1.29 + the mark and the label. The xul:image then takes over painting the check 1.30 + mark. */ 1.31 + 1.32 +.checkbox-spacer-box { 1.33 + -moz-appearance: checkbox; 1.34 + -moz-box-align: center; 1.35 + margin: 2px; 1.36 + border-right: 2px solid transparent; 1.37 +} 1.38 + 1.39 +.checkbox-label-center-box { 1.40 + -moz-box-align: center; 1.41 +} 1.42 + 1.43 +.checkbox-label-box { 1.44 + -moz-appearance: checkbox-label; 1.45 +} 1.46 + 1.47 +.checkbox-icon[src] { 1.48 + -moz-margin-end: 2px; 1.49 +} 1.50 + 1.51 +.checkbox-label { 1.52 + margin: 0 !important; 1.53 +} 1.54 + 1.55 +/* ..... focused state ..... */ 1.56 + 1.57 +checkbox:focus > .checkbox-label-center-box > .checkbox-label-box { 1.58 + border: 1px dotted ThreeDDarkShadow; 1.59 +} 1.60 + 1.61 +/* ..... disabled state ..... */ 1.62 + 1.63 +checkbox[disabled="true"] > .checkbox-spacer-box > .checkbox-check { 1.64 + background-color: -moz-Dialog; 1.65 +} 1.66 + 1.67 +checkbox[disabled="true"] { 1.68 + color: GrayText; 1.69 +} 1.70 + 1.71 +/* ::::: checkmark image ::::: */ 1.72 + 1.73 +.checkbox-check { 1.74 + border: 2px solid; 1.75 + -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow; 1.76 + -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow; 1.77 + -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow; 1.78 + -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; 1.79 + min-width: 13px; 1.80 + min-height: 13px; 1.81 + background: -moz-Field no-repeat 50% 50%; 1.82 +} 1.83 + 1.84 +checkbox:not([disabled="true"]):hover { 1.85 + color: -moz-buttonhovertext; 1.86 + text-shadow: none; 1.87 +} 1.88 + 1.89 +checkbox:hover:active > .checkbox-spacer-box > .checkbox-check { 1.90 + background-color: -moz-Dialog; 1.91 +} 1.92 + 1.93 +/* ..... checked state ..... */ 1.94 + 1.95 +checkbox[checked="true"] > .checkbox-spacer-box > .checkbox-check { 1.96 + background-image: url("chrome://global/skin/checkbox/cbox-check.gif"); 1.97 +} 1.98 + 1.99 +checkbox[checked="true"][disabled="true"] > .checkbox-spacer-box > .checkbox-check { 1.100 + background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif") !important 1.101 +} 1.102 +