toolkit/themes/linux/global/checkbox.css

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 /* ===== checkbox.css ===================================================
     6   == Styles used by the XUL checkbox element.
     7   ======================================================================= */
     9 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    11 /* ::::: checkbox ::::: */
    13 checkbox {
    14   -moz-appearance: checkbox-container;
    15   margin: 2px 4px;
    16   border-left: 2px transparent;
    17   border-right: 2px transparent;
    18 }
    20 /* With native theming on, the spacer-box paints the check mark and includes
    21    the spacing to the right, so that oversized checkbox images can slop over
    22    into the space.
    24    If we need to disable checkbox theming, the spacer box no longer paints
    25    the check mark, but its fallback CSS border supplies the padding between
    26    the mark and the label.  The xul:image then takes over painting the check
    27    mark. */
    29 .checkbox-spacer-box {
    30   -moz-appearance: checkbox;
    31   -moz-box-align: center;
    32   margin: 2px;
    33   border-right: 2px solid transparent;
    34 }
    36 .checkbox-label-center-box {
    37   -moz-box-align: center;
    38 }
    40 .checkbox-label-box {
    41   -moz-appearance: checkbox-label;
    42 }
    44 .checkbox-icon[src] {
    45   -moz-margin-end: 2px;
    46 }
    48 .checkbox-label {
    49   margin: 0 !important;
    50 }
    52 /* ..... focused state ..... */
    54 checkbox:focus > .checkbox-label-center-box > .checkbox-label-box {
    55   border: 1px dotted ThreeDDarkShadow;
    56 }
    58 /* ..... disabled state ..... */
    60 checkbox[disabled="true"] > .checkbox-spacer-box > .checkbox-check {
    61   background-color: -moz-Dialog;
    62 }
    64 checkbox[disabled="true"] {
    65   color: GrayText;
    66 }
    68 /* ::::: checkmark image ::::: */
    70 .checkbox-check {
    71   border: 2px solid;
    72   -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
    73   -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
    74   -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
    75   -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
    76   min-width: 13px;
    77   min-height: 13px;
    78   background: -moz-Field no-repeat 50% 50%;
    79 }
    81 checkbox:not([disabled="true"]):hover {
    82   color: -moz-buttonhovertext;
    83   text-shadow: none;
    84 }
    86 checkbox:hover:active > .checkbox-spacer-box > .checkbox-check {
    87   background-color: -moz-Dialog;
    88 }
    90 /* ..... checked state ..... */
    92 checkbox[checked="true"] > .checkbox-spacer-box > .checkbox-check {
    93   background-image: url("chrome://global/skin/checkbox/cbox-check.gif");
    94 }
    96 checkbox[checked="true"][disabled="true"] > .checkbox-spacer-box > .checkbox-check {
    97   background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif") !important
    98 }

mercurial