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 | /* ===== toolbarbutton.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 | /* ::::: toolbarbutton ::::: */ |
michael@0 | 12 | |
michael@0 | 13 | toolbarbutton { |
michael@0 | 14 | -moz-appearance: toolbarbutton; |
michael@0 | 15 | -moz-box-align: center; |
michael@0 | 16 | -moz-box-pack: center; |
michael@0 | 17 | margin: 0; |
michael@0 | 18 | border: 1px solid transparent; |
michael@0 | 19 | padding: 3px; |
michael@0 | 20 | background-color: transparent; |
michael@0 | 21 | color: -moz-DialogText; |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | .toolbarbutton-icon[label]:not([label=""]), |
michael@0 | 25 | .toolbarbutton-icon[type="menu"] { |
michael@0 | 26 | -moz-margin-end: 5px; |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | .toolbarbutton-text { |
michael@0 | 30 | margin: 0 !important; |
michael@0 | 31 | text-align: center; |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | toolbarbutton.tabbable { |
michael@0 | 35 | -moz-user-focus: normal !important; |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | toolbarbutton:-moz-focusring { |
michael@0 | 39 | /* -moz-appearance looks redundant here but is necessary. |
michael@0 | 40 | Without it, the outline won't appear. */ |
michael@0 | 41 | -moz-appearance: toolbarbutton; |
michael@0 | 42 | outline: 1px dotted -moz-DialogText; |
michael@0 | 43 | outline-offset: -2px; |
michael@0 | 44 | } |
michael@0 | 45 | |
michael@0 | 46 | toolbarbutton:hover:not([disabled="true"]) { |
michael@0 | 47 | border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; |
michael@0 | 48 | } |
michael@0 | 49 | |
michael@0 | 50 | toolbarbutton:hover:active:not([disabled="true"]), |
michael@0 | 51 | toolbarbutton[open="true"]:hover, |
michael@0 | 52 | toolbarbutton[open="true"] { |
michael@0 | 53 | border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow; |
michael@0 | 54 | padding-top: 4px; |
michael@0 | 55 | padding-bottom: 2px; |
michael@0 | 56 | -moz-padding-start: 4px; |
michael@0 | 57 | -moz-padding-end: 2px; |
michael@0 | 58 | } |
michael@0 | 59 | |
michael@0 | 60 | toolbarbutton[disabled="true"] { |
michael@0 | 61 | color: GrayText; |
michael@0 | 62 | text-shadow: none; |
michael@0 | 63 | } |
michael@0 | 64 | |
michael@0 | 65 | @media (-moz-windows-classic) { |
michael@0 | 66 | toolbarbutton[disabled="true"] { |
michael@0 | 67 | color: ThreeDShadow; |
michael@0 | 68 | text-shadow: 1px 1px ThreeDHighlight; |
michael@0 | 69 | } |
michael@0 | 70 | } |
michael@0 | 71 | |
michael@0 | 72 | toolbarbutton[checked="true"]:not([disabled="true"]) { |
michael@0 | 73 | border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow; |
michael@0 | 74 | padding-top: 4px; |
michael@0 | 75 | padding-bottom: 2px; |
michael@0 | 76 | -moz-padding-start: 4px; |
michael@0 | 77 | -moz-padding-end: 2px; |
michael@0 | 78 | background-color: rgba(255,255,255,0.5); |
michael@0 | 79 | color: ButtonText; |
michael@0 | 80 | } |
michael@0 | 81 | |
michael@0 | 82 | @media (-moz-windows-default-theme) { |
michael@0 | 83 | toolbarbutton:-moz-lwtheme { |
michael@0 | 84 | text-shadow: none; |
michael@0 | 85 | } |
michael@0 | 86 | |
michael@0 | 87 | toolbarbutton:-moz-lwtheme:not(:hover):not([checked="true"]):not([open="true"]):not([disabled="true"]) { |
michael@0 | 88 | color: inherit; |
michael@0 | 89 | text-shadow: inherit; |
michael@0 | 90 | } |
michael@0 | 91 | } |
michael@0 | 92 | |
michael@0 | 93 | @media not all and (-moz-windows-default-theme) { |
michael@0 | 94 | toolbarbutton:-moz-lwtheme { |
michael@0 | 95 | -moz-appearance: none; |
michael@0 | 96 | } |
michael@0 | 97 | |
michael@0 | 98 | toolbarbutton:-moz-lwtheme:not([disabled="true"]) { |
michael@0 | 99 | color: inherit; |
michael@0 | 100 | text-shadow: inherit; |
michael@0 | 101 | } |
michael@0 | 102 | } |
michael@0 | 103 | |
michael@0 | 104 | /* ::::: toolbarbutton menu ::::: */ |
michael@0 | 105 | |
michael@0 | 106 | .toolbarbutton-menu-dropmarker { |
michael@0 | 107 | -moz-appearance: none !important; |
michael@0 | 108 | border: none !important; |
michael@0 | 109 | background-color: transparent !important; |
michael@0 | 110 | padding: 0; |
michael@0 | 111 | width: auto; |
michael@0 | 112 | height: auto; |
michael@0 | 113 | margin-top: 1px; |
michael@0 | 114 | } |
michael@0 | 115 | |
michael@0 | 116 | /* ::::: toolbarbutton menu-button ::::: */ |
michael@0 | 117 | |
michael@0 | 118 | toolbarbutton[type="menu-button"] { |
michael@0 | 119 | -moz-box-align: stretch; |
michael@0 | 120 | -moz-box-orient: horizontal !important; |
michael@0 | 121 | } |
michael@0 | 122 | |
michael@0 | 123 | toolbarbutton[type="menu-button"], |
michael@0 | 124 | toolbarbutton[type="menu-button"]:hover, |
michael@0 | 125 | toolbarbutton[type="menu-button"]:hover:active, |
michael@0 | 126 | toolbarbutton[type="menu-button"][open="true"], |
michael@0 | 127 | toolbarbutton[type="menu-button"][disabled="true"], |
michael@0 | 128 | toolbarbutton[type="menu-button"][disabled="true"]:hover, |
michael@0 | 129 | toolbarbutton[type="menu-button"][disabled="true"]:hover:active { |
michael@0 | 130 | border-style: none; |
michael@0 | 131 | padding: 0 !important; |
michael@0 | 132 | } |
michael@0 | 133 | |
michael@0 | 134 | .toolbarbutton-menubutton-button { |
michael@0 | 135 | -moz-box-align: center; |
michael@0 | 136 | -moz-box-pack: center; |
michael@0 | 137 | -moz-box-orient: vertical; |
michael@0 | 138 | } |
michael@0 | 139 | |
michael@0 | 140 | /* .......... dropmarker .......... */ |
michael@0 | 141 | |
michael@0 | 142 | .toolbarbutton-menubutton-dropmarker { |
michael@0 | 143 | -moz-appearance: none; |
michael@0 | 144 | padding: 3px 7px; |
michael@0 | 145 | border: none; |
michael@0 | 146 | background-color: transparent; |
michael@0 | 147 | width: auto; |
michael@0 | 148 | } |