Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | /* ===== button.css ===================================================== |
michael@0 | 6 | == Styles used by the XUL button element. |
michael@0 | 7 | ======================================================================= */ |
michael@0 | 8 | |
michael@0 | 9 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); |
michael@0 | 10 | |
michael@0 | 11 | /* :::::::::: button :::::::::: */ |
michael@0 | 12 | |
michael@0 | 13 | button { |
michael@0 | 14 | -moz-appearance: button; |
michael@0 | 15 | margin: 1px 5px 2px 5px; |
michael@0 | 16 | min-width: 6.3em; |
michael@0 | 17 | border: 3px solid; |
michael@0 | 18 | -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow; |
michael@0 | 19 | -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow; |
michael@0 | 20 | -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow; |
michael@0 | 21 | -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow; |
michael@0 | 22 | background-color: ThreeDFace; |
michael@0 | 23 | color: ButtonText; |
michael@0 | 24 | text-shadow: none; |
michael@0 | 25 | } |
michael@0 | 26 | |
michael@0 | 27 | .button-box { |
michael@0 | 28 | border: 1px solid transparent; |
michael@0 | 29 | padding-top: 1px; |
michael@0 | 30 | padding-bottom: 2px; |
michael@0 | 31 | -moz-padding-start: 3px; |
michael@0 | 32 | -moz-padding-end: 4px; |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | .button-text { |
michael@0 | 36 | margin: 0 !important; |
michael@0 | 37 | text-align: center; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | /* .......... focused state .......... */ |
michael@0 | 41 | |
michael@0 | 42 | button:focus { |
michael@0 | 43 | -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight transparent; |
michael@0 | 44 | -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 45 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 46 | -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight transparent; |
michael@0 | 47 | } |
michael@0 | 48 | |
michael@0 | 49 | button:-moz-focusring > .button-box { |
michael@0 | 50 | border: 1px dotted ThreeDDarkShadow; |
michael@0 | 51 | } |
michael@0 | 52 | |
michael@0 | 53 | /* .......... default state .......... */ |
michael@0 | 54 | |
michael@0 | 55 | button[default="true"] { |
michael@0 | 56 | -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow; |
michael@0 | 57 | -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 58 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
michael@0 | 59 | -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow; |
michael@0 | 60 | } |
michael@0 | 61 | |
michael@0 | 62 | /* .......... active/open/checked state .......... */ |
michael@0 | 63 | |
michael@0 | 64 | button:hover:active, |
michael@0 | 65 | button[open="true"], |
michael@0 | 66 | button[checked="true"] { |
michael@0 | 67 | -moz-border-top-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 68 | -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 69 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 70 | -moz-border-left-colors: ThreeDDarkShadow ThreeDShadow transparent; |
michael@0 | 71 | } |
michael@0 | 72 | |
michael@0 | 73 | button:hover:active > .button-box:-moz-system-metric(windows-classic), |
michael@0 | 74 | button[open="true"] > .button-box:-moz-system-metric(windows-classic), |
michael@0 | 75 | button[checked="true"] > .button-box:-moz-system-metric(windows-classic) { |
michael@0 | 76 | padding-top: 2px; |
michael@0 | 77 | padding-bottom: 1px; |
michael@0 | 78 | -moz-padding-start: 4px; |
michael@0 | 79 | -moz-padding-end: 3px; |
michael@0 | 80 | } |
michael@0 | 81 | |
michael@0 | 82 | /* .......... disabled state .......... */ |
michael@0 | 83 | |
michael@0 | 84 | button[disabled="true"] { |
michael@0 | 85 | -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow !important; |
michael@0 | 86 | -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow !important; |
michael@0 | 87 | -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow !important; |
michael@0 | 88 | -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow !important; |
michael@0 | 89 | color: GrayText; |
michael@0 | 90 | } |
michael@0 | 91 | |
michael@0 | 92 | button[disabled="true"]:-moz-system-metric(windows-classic) { |
michael@0 | 93 | color: ThreeDShadow; |
michael@0 | 94 | text-shadow: 1px 1px ThreeDHighlight; |
michael@0 | 95 | } |
michael@0 | 96 | |
michael@0 | 97 | button[disabled="true"] > .button-box { |
michael@0 | 98 | padding-top: 1px !important; |
michael@0 | 99 | padding-bottom: 2px !important; |
michael@0 | 100 | -moz-padding-start: 3px !important; |
michael@0 | 101 | -moz-padding-end: 4px !important; |
michael@0 | 102 | } |
michael@0 | 103 | |
michael@0 | 104 | /* ::::: menu/menu-button buttons ::::: */ |
michael@0 | 105 | |
michael@0 | 106 | button[type="menu-button"] { |
michael@0 | 107 | margin: 0; |
michael@0 | 108 | border: none; |
michael@0 | 109 | } |
michael@0 | 110 | |
michael@0 | 111 | .button-menu-dropmarker, |
michael@0 | 112 | .button-menubutton-dropmarker { |
michael@0 | 113 | -moz-appearance: none !important; |
michael@0 | 114 | margin: 1px; |
michael@0 | 115 | background-color: transparent; |
michael@0 | 116 | border: none; |
michael@0 | 117 | width: 11px; |
michael@0 | 118 | height: 11px; |
michael@0 | 119 | } |
michael@0 | 120 | |
michael@0 | 121 | .button-menubutton-dropmarker[open="true"] { |
michael@0 | 122 | margin-top: 2px; |
michael@0 | 123 | margin-bottom: 0px; |
michael@0 | 124 | -moz-margin-start: 2px; |
michael@0 | 125 | -moz-margin-end: 0px; |
michael@0 | 126 | } |
michael@0 | 127 | |
michael@0 | 128 | /* ::::: plain buttons ::::: */ |
michael@0 | 129 | |
michael@0 | 130 | button.plain { |
michael@0 | 131 | border: 0px !important; |
michael@0 | 132 | margin: 0px !important; |
michael@0 | 133 | padding: 0px !important; |
michael@0 | 134 | } |
michael@0 | 135 | |
michael@0 | 136 | button[type="disclosure"] { |
michael@0 | 137 | border: 0px !important; |
michael@0 | 138 | margin: 0px !important; |
michael@0 | 139 | padding: 0px !important; |
michael@0 | 140 | -moz-appearance: none; |
michael@0 | 141 | list-style-image: url("chrome://global/skin/tree/twisty-clsd.png"); |
michael@0 | 142 | min-width: 0px !important; |
michael@0 | 143 | background-color: transparent; |
michael@0 | 144 | } |
michael@0 | 145 | |
michael@0 | 146 | button[type="disclosure"][open="true"] { |
michael@0 | 147 | list-style-image: url("chrome://global/skin/tree/twisty-open.png"); |
michael@0 | 148 | } |