Commit | Line | Data |
---|---|---|
9099c61d RK |
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/. */ | |
e69db91c | 4 | |
e69db91c | 5 | /* ===== scrollbars.css ================================================= |
6 | == Styles used by XUL scrollbar-related elements. | |
7 | ======================================================================= */ | |
8 | ||
e181d49e RK |
9 | @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); |
10 | @namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */ | |
11 | ||
e69db91c | 12 | /* ::::: scrollbar ::::: */ |
13 | ||
14 | scrollbar { | |
15 | -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar"); | |
16 | cursor: default; | |
17 | background-color: #999999; | |
87a1144f RK |
18 | pointer-events: auto; |
19 | } | |
20 | ||
87a1144f | 21 | @media all and (-moz-overlay-scrollbars) { |
2e88f3cc RK |
22 | scrollbar[root="true"] { |
23 | position: relative; | |
24 | z-index: 2147483647; /* largest positive value of a signed 32-bit integer */ | |
25 | } | |
26 | ||
87a1144f RK |
27 | scrollbar:not([active="true"]), |
28 | scrollbar[disabled="true"] { | |
29 | visibility: hidden; | |
30 | } | |
e69db91c | 31 | } |
32 | ||
33 | /* ::::: slider ::::: */ | |
34 | ||
35 | slider { | |
36 | height: 13px; | |
37 | } | |
38 | ||
39 | slider[orient="vertical"] { | |
40 | width: 13px; | |
41 | } | |
42 | ||
43 | /* ::::: borders for thumb and buttons ::::: */ | |
44 | ||
45 | thumb, | |
46 | scrollbarbutton { | |
47 | border: 1px outset #CCCCCC; | |
48 | background: #CCCCCC 50% 50% no-repeat; | |
49 | padding: 1px; | |
50 | min-width: 13px; | |
51 | min-height: 13px; | |
52 | } | |
53 | ||
54 | thumb:active { | |
55 | background-color: #DDDDDD; | |
56 | } | |
57 | ||
58 | /* ::::: thumb (horizontal) ::::: */ | |
59 | ||
60 | thumb { | |
61 | background-image: url("chrome://global/skin/scrollbar/thumb-vert-grip.gif"); | |
62 | } | |
63 | ||
64 | thumb[orient="horizontal"] { | |
65 | background-image: url("chrome://global/skin/scrollbar/thumb-horiz-grip.gif"); | |
66 | } | |
67 | ||
68 | thumb[disabled="true"] { | |
69 | background-image: url("chrome://global/skin/scrollbar/thumb-vert-grip-disabled.gif"); | |
70 | } | |
71 | ||
72 | thumb[orient="horizontal"][disabled="true"] { | |
73 | background-image: url("chrome://global/skin/scrollbar/thumb-horiz-grip-disabled.gif"); | |
74 | } | |
75 | ||
76 | /* ::::: scrollbar button ::::: */ | |
77 | ||
78 | scrollbarbutton { | |
79 | } | |
80 | ||
1d4ddf30 | 81 | scrollbarbutton:hover:active, |
82 | scrollbarbutton[active="true"] { | |
e69db91c | 83 | border-style: inset; |
02920d2b RK |
84 | padding-top: 2px; |
85 | padding-bottom: 0px; | |
dae45075 RK |
86 | padding-inline-start: 2px; |
87 | padding-inline-end: 0px; | |
e69db91c | 88 | } |
89 | ||
56029caf RK |
90 | /* XXX - scrollbar.xml always grabs the OS settings and we don't want that */ |
91 | scrollbarbutton[sbattr="scrollbar-up-bottom"], | |
92 | scrollbarbutton[sbattr="scrollbar-down-top"] { | |
93 | display: none; | |
94 | } | |
733b8160 RK |
95 | scrollbarbutton[sbattr="scrollbar-up-top"], |
96 | scrollbarbutton[sbattr="scrollbar-down-bottom"] { | |
97 | display: -moz-box !important; | |
98 | } | |
56029caf | 99 | |
e69db91c | 100 | /* ::::: square at the corner of two scrollbars ::::: */ |
101 | ||
102 | scrollcorner { | |
103 | -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar-base"); | |
104 | cursor: default; | |
105 | background-color: #999999; | |
e68e2f2b | 106 | width: 13px; |
e69db91c | 107 | } |
108 | ||
109 | /* ..... increment .... */ | |
110 | ||
111 | scrollbarbutton[type="increment"] { | |
112 | background-image: url("chrome://global/skin/scrollbar/button-right.gif") | |
113 | } | |
114 | ||
115 | ||
116 | scrollbarbutton[type="increment"][disabled="true"] { | |
117 | background-image: url("chrome://global/skin/scrollbar/button-right-disabled.gif") | |
118 | } | |
119 | ||
120 | scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] { | |
121 | background-image: url("chrome://global/skin/scrollbar/button-down.gif") | |
122 | } | |
123 | ||
124 | scrollbar[orient="vertical"] > scrollbarbutton[type="increment"][disabled="true"] { | |
125 | background-image: url("chrome://global/skin/scrollbar/button-down-disabled.gif") | |
126 | } | |
127 | ||
128 | /* ..... decrement .... */ | |
129 | ||
130 | scrollbarbutton[type="decrement"] { | |
131 | background-image: url("chrome://global/skin/scrollbar/button-left.gif") | |
132 | } | |
133 | ||
134 | scrollbarbutton[type="decrement"][disabled="true"] { | |
135 | background-image: url("chrome://global/skin/scrollbar/button-left-disabled.gif") | |
136 | } | |
137 | ||
138 | scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] { | |
139 | background-image: url("chrome://global/skin/scrollbar/button-up.gif") | |
140 | } | |
141 | ||
142 | scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"][disabled="true"] { | |
143 | background-image: url("chrome://global/skin/scrollbar/button-up-disabled.gif") | |
144 | } | |
145 | ||
146 | /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ | |
147 | /* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */ | |
148 | /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ | |
149 | @media print { | |
150 | /* ::::: scrollbar ::::: */ | |
151 | ||
152 | html|div scrollbar { | |
153 | -moz-appearance: scrollbartrack-horizontal; | |
154 | -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar"); | |
155 | cursor: default; | |
156 | background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar; | |
157 | } | |
158 | ||
159 | html|div scrollbar[orient="vertical"] | |
160 | { | |
161 | -moz-appearance: scrollbartrack-vertical; | |
162 | } | |
163 | ||
164 | /* ::::: borders for thumb and buttons ::::: */ | |
165 | ||
166 | html|div thumb, | |
167 | html|div scrollbarbutton { | |
168 | border: 2px solid; | |
169 | -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight; | |
170 | -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow; | |
171 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow; | |
172 | -moz-border-left-colors: ThreeDLightShadow ThreeDHighlight; | |
173 | background-color: -moz-Dialog; | |
174 | } | |
175 | ||
176 | /* ::::: thumb (horizontal) ::::: */ | |
177 | ||
178 | html|div thumb { | |
179 | -moz-appearance: scrollbarthumb-vertical; | |
180 | min-height: 8px; | |
181 | } | |
182 | ||
183 | html|div thumb[orient="horizontal"] { | |
184 | -moz-appearance: scrollbarthumb-horizontal; | |
185 | min-width: 8px; | |
186 | } | |
187 | ||
e69db91c | 188 | /* ::::: scrollbar button ::::: */ |
189 | ||
1d4ddf30 | 190 | html|div scrollbarbutton, |
191 | html|div scrollbarbutton[active="true"] { | |
7862e6ee | 192 | background: -moz-Dialog no-repeat 50% 50%; |
e69db91c | 193 | min-width: 16px; |
194 | min-height: 16px; | |
195 | } | |
196 | ||
197 | html|div scrollbarbutton:hover:active { | |
198 | -moz-border-top-colors: ThreeDShadow -moz-Dialog; | |
199 | -moz-border-right-colors: ThreeDShadow -moz-Dialog; | |
200 | -moz-border-bottom-colors: ThreeDShadow -moz-Dialog; | |
201 | -moz-border-left-colors: ThreeDShadow -moz-Dialog; | |
7862e6ee | 202 | background-position: 60% 60%; |
e69db91c | 203 | } |
204 | ||
205 | /* ..... increment .... */ | |
206 | ||
207 | html|div scrollbarbutton[type="increment"] { | |
208 | -moz-appearance: scrollbarbutton-right; | |
dbad77ea | 209 | background-image: url("chrome://global/skin/arrow/arrow-right.gif") |
e69db91c | 210 | } |
211 | ||
212 | html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] { | |
213 | -moz-appearance: scrollbarbutton-down; | |
dbad77ea | 214 | background-image: url("chrome://global/skin/arrow/arrow-down.gif") |
e69db91c | 215 | } |
216 | ||
217 | /* ..... decrement .... */ | |
218 | ||
219 | html|div scrollbarbutton[type="decrement"] { | |
220 | -moz-appearance: scrollbarbutton-left; | |
dbad77ea | 221 | background-image: url("chrome://global/skin/arrow/arrow-left.gif") |
e69db91c | 222 | } |
223 | ||
224 | html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] { | |
225 | -moz-appearance: scrollbarbutton-up; | |
226 | background-image: url("chrome://global/skin/arrow/arrow-up.gif") | |
227 | } | |
228 | ||
229 | } |