toolkit/themes/windows/global/button.css

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 /* ===== button.css =====================================================
     6   == Styles used by the XUL button element.
     7   ======================================================================= */
     9 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    11 /* :::::::::: button :::::::::: */
    13 button {
    14   -moz-appearance: button;
    15   margin: 1px 5px 2px 5px;
    16   min-width: 6.3em;
    17   border: 3px solid;
    18   -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow;
    19   -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow;
    20   -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow;
    21   -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow;
    22   background-color: ThreeDFace;
    23   color: ButtonText;
    24   text-shadow: none;
    25 }
    27 .button-box {
    28   border: 1px solid transparent;
    29   padding-top: 1px;
    30   padding-bottom: 2px;
    31   -moz-padding-start: 3px;
    32   -moz-padding-end: 4px;
    33 }
    35 .button-text {
    36   margin: 0 !important;
    37   text-align: center;
    38 }
    40 /* .......... focused state .......... */
    42 button:focus {
    43   -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight transparent;
    44   -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow;
    45   -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow;
    46   -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight transparent;
    47 }
    49 button:-moz-focusring > .button-box {
    50   border: 1px dotted ThreeDDarkShadow;
    51 }
    53 /* .......... default state .......... */
    55 button[default="true"] {
    56   -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow;
    57   -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow;
    58   -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow;
    59   -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow;
    60 }
    62 /* .......... active/open/checked state .......... */
    64 button:hover:active,
    65 button[open="true"],
    66 button[checked="true"] {
    67   -moz-border-top-colors: ThreeDDarkShadow ThreeDShadow transparent;
    68   -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow transparent;
    69   -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow transparent;
    70   -moz-border-left-colors: ThreeDDarkShadow ThreeDShadow transparent;
    71 }
    73 button:hover:active > .button-box:-moz-system-metric(windows-classic),
    74 button[open="true"] > .button-box:-moz-system-metric(windows-classic),
    75 button[checked="true"] > .button-box:-moz-system-metric(windows-classic) {
    76   padding-top: 2px;
    77   padding-bottom: 1px;
    78   -moz-padding-start: 4px;
    79   -moz-padding-end: 3px;
    80 }
    82 /* .......... disabled state .......... */
    84 button[disabled="true"] {
    85   -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow !important;
    86   -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow !important;
    87   -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow !important;
    88   -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow !important;
    89   color: GrayText;
    90 }
    92 button[disabled="true"]:-moz-system-metric(windows-classic) {
    93   color: ThreeDShadow;
    94   text-shadow: 1px 1px ThreeDHighlight;
    95 }
    97 button[disabled="true"] > .button-box {
    98   padding-top: 1px !important;
    99   padding-bottom: 2px !important;
   100   -moz-padding-start: 3px !important;
   101   -moz-padding-end: 4px !important;
   102 }
   104 /* ::::: menu/menu-button buttons ::::: */
   106 button[type="menu-button"] {
   107   margin: 0;
   108   border: none;
   109 }
   111 .button-menu-dropmarker,
   112 .button-menubutton-dropmarker {
   113   -moz-appearance: none !important;
   114   margin: 1px;
   115   background-color: transparent;
   116   border: none;
   117   width: 11px;
   118   height: 11px;
   119 }
   121 .button-menubutton-dropmarker[open="true"] {
   122   margin-top: 2px;
   123   margin-bottom: 0px;
   124   -moz-margin-start: 2px;
   125   -moz-margin-end: 0px;
   126 }
   128 /* ::::: plain buttons ::::: */
   130 button.plain {
   131   border: 0px !important;
   132   margin: 0px !important;
   133   padding: 0px !important;
   134 }
   136 button[type="disclosure"] {
   137   border: 0px !important;
   138   margin: 0px !important;
   139   padding: 0px !important;
   140   -moz-appearance: none;
   141   list-style-image: url("chrome://global/skin/tree/twisty-clsd.png");
   142   min-width: 0px !important;
   143   background-color: transparent;
   144 }
   146 button[type="disclosure"][open="true"] {
   147   list-style-image: url("chrome://global/skin/tree/twisty-open.png");
   148 }

mercurial