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: /* ===== checkbox.css =================================================== michael@0: == Styles used by the XUL checkbox element. michael@0: ======================================================================= */ michael@0: michael@0: @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); michael@0: michael@0: /* ::::: checkbox ::::: */ michael@0: michael@0: checkbox { michael@0: -moz-appearance: checkbox-container; michael@0: margin: 2px 4px; michael@0: border-left: 2px transparent; michael@0: border-right: 2px transparent; michael@0: } michael@0: michael@0: /* With native theming on, the spacer-box paints the check mark and includes michael@0: the spacing to the right, so that oversized checkbox images can slop over michael@0: into the space. michael@0: michael@0: If we need to disable checkbox theming, the spacer box no longer paints michael@0: the check mark, but its fallback CSS border supplies the padding between michael@0: the mark and the label. The xul:image then takes over painting the check michael@0: mark. */ michael@0: michael@0: .checkbox-spacer-box { michael@0: -moz-appearance: checkbox; michael@0: -moz-box-align: center; michael@0: margin: 2px; michael@0: border-right: 2px solid transparent; michael@0: } michael@0: michael@0: .checkbox-label-center-box { michael@0: -moz-box-align: center; michael@0: } michael@0: michael@0: .checkbox-label-box { michael@0: -moz-appearance: checkbox-label; michael@0: } michael@0: michael@0: .checkbox-icon[src] { michael@0: -moz-margin-end: 2px; michael@0: } michael@0: michael@0: .checkbox-label { michael@0: margin: 0 !important; michael@0: } michael@0: michael@0: /* ..... focused state ..... */ michael@0: michael@0: checkbox:focus > .checkbox-label-center-box > .checkbox-label-box { michael@0: border: 1px dotted ThreeDDarkShadow; michael@0: } michael@0: michael@0: /* ..... disabled state ..... */ michael@0: michael@0: checkbox[disabled="true"] > .checkbox-spacer-box > .checkbox-check { michael@0: background-color: -moz-Dialog; michael@0: } michael@0: michael@0: checkbox[disabled="true"] { michael@0: color: GrayText; michael@0: } michael@0: michael@0: /* ::::: checkmark image ::::: */ michael@0: michael@0: .checkbox-check { michael@0: border: 2px solid; michael@0: -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow; michael@0: -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow; michael@0: -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow; michael@0: -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; michael@0: min-width: 13px; michael@0: min-height: 13px; michael@0: background: -moz-Field no-repeat 50% 50%; michael@0: } michael@0: michael@0: checkbox:not([disabled="true"]):hover { michael@0: color: -moz-buttonhovertext; michael@0: text-shadow: none; michael@0: } michael@0: michael@0: checkbox:hover:active > .checkbox-spacer-box > .checkbox-check { michael@0: background-color: -moz-Dialog; michael@0: } michael@0: michael@0: /* ..... checked state ..... */ michael@0: michael@0: checkbox[checked="true"] > .checkbox-spacer-box > .checkbox-check { michael@0: background-image: url("chrome://global/skin/checkbox/cbox-check.gif"); michael@0: } michael@0: michael@0: checkbox[checked="true"][disabled="true"] > .checkbox-spacer-box > .checkbox-check { michael@0: background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif") !important michael@0: } michael@0: