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; | |
18 | } | |
19 | ||
20 | /* ::::: slider ::::: */ | |
21 | ||
22 | slider { | |
23 | height: 13px; | |
24 | } | |
25 | ||
26 | slider[orient="vertical"] { | |
27 | width: 13px; | |
28 | } | |
29 | ||
30 | /* ::::: borders for thumb and buttons ::::: */ | |
31 | ||
32 | thumb, | |
33 | scrollbarbutton { | |
34 | border: 1px outset #CCCCCC; | |
35 | background: #CCCCCC 50% 50% no-repeat; | |
36 | padding: 1px; | |
37 | min-width: 13px; | |
38 | min-height: 13px; | |
39 | } | |
40 | ||
41 | thumb:active { | |
42 | background-color: #DDDDDD; | |
43 | } | |
44 | ||
45 | /* ::::: thumb (horizontal) ::::: */ | |
46 | ||
47 | thumb { | |
48 | background-image: url("chrome://global/skin/scrollbar/thumb-vert-grip.gif"); | |
49 | } | |
50 | ||
51 | thumb[orient="horizontal"] { | |
52 | background-image: url("chrome://global/skin/scrollbar/thumb-horiz-grip.gif"); | |
53 | } | |
54 | ||
55 | thumb[disabled="true"] { | |
56 | background-image: url("chrome://global/skin/scrollbar/thumb-vert-grip-disabled.gif"); | |
57 | } | |
58 | ||
59 | thumb[orient="horizontal"][disabled="true"] { | |
60 | background-image: url("chrome://global/skin/scrollbar/thumb-horiz-grip-disabled.gif"); | |
61 | } | |
62 | ||
63 | /* ::::: scrollbar button ::::: */ | |
64 | ||
65 | scrollbarbutton { | |
66 | } | |
67 | ||
1d4ddf30 | 68 | scrollbarbutton:hover:active, |
69 | scrollbarbutton[active="true"] { | |
e69db91c | 70 | border-style: inset; |
02920d2b RK |
71 | padding-top: 2px; |
72 | padding-bottom: 0px; | |
73 | -moz-padding-start: 2px; | |
74 | -moz-padding-end: 0px; | |
e69db91c | 75 | } |
76 | ||
56029caf RK |
77 | /* XXX - scrollbar.xml always grabs the OS settings and we don't want that */ |
78 | scrollbarbutton[sbattr="scrollbar-up-bottom"], | |
79 | scrollbarbutton[sbattr="scrollbar-down-top"] { | |
80 | display: none; | |
81 | } | |
82 | ||
e69db91c | 83 | /* ::::: square at the corner of two scrollbars ::::: */ |
84 | ||
85 | scrollcorner { | |
86 | -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar-base"); | |
87 | cursor: default; | |
88 | background-color: #999999; | |
e68e2f2b | 89 | width: 13px; |
e69db91c | 90 | } |
91 | ||
92 | /* ..... increment .... */ | |
93 | ||
94 | scrollbarbutton[type="increment"] { | |
95 | background-image: url("chrome://global/skin/scrollbar/button-right.gif") | |
96 | } | |
97 | ||
98 | ||
99 | scrollbarbutton[type="increment"][disabled="true"] { | |
100 | background-image: url("chrome://global/skin/scrollbar/button-right-disabled.gif") | |
101 | } | |
102 | ||
103 | scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] { | |
104 | background-image: url("chrome://global/skin/scrollbar/button-down.gif") | |
105 | } | |
106 | ||
107 | scrollbar[orient="vertical"] > scrollbarbutton[type="increment"][disabled="true"] { | |
108 | background-image: url("chrome://global/skin/scrollbar/button-down-disabled.gif") | |
109 | } | |
110 | ||
111 | /* ..... decrement .... */ | |
112 | ||
113 | scrollbarbutton[type="decrement"] { | |
114 | background-image: url("chrome://global/skin/scrollbar/button-left.gif") | |
115 | } | |
116 | ||
117 | scrollbarbutton[type="decrement"][disabled="true"] { | |
118 | background-image: url("chrome://global/skin/scrollbar/button-left-disabled.gif") | |
119 | } | |
120 | ||
121 | scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] { | |
122 | background-image: url("chrome://global/skin/scrollbar/button-up.gif") | |
123 | } | |
124 | ||
125 | scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"][disabled="true"] { | |
126 | background-image: url("chrome://global/skin/scrollbar/button-up-disabled.gif") | |
127 | } | |
128 | ||
129 | /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ | |
130 | /* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */ | |
131 | /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ | |
132 | @media print { | |
133 | /* ::::: scrollbar ::::: */ | |
134 | ||
135 | html|div scrollbar { | |
136 | -moz-appearance: scrollbartrack-horizontal; | |
137 | -moz-binding: url("chrome://global/content/bindings/scrollbar.xml#scrollbar"); | |
138 | cursor: default; | |
139 | background: url("chrome://global/skin/scrollbar/slider.gif") scrollbar; | |
140 | } | |
141 | ||
142 | html|div scrollbar[orient="vertical"] | |
143 | { | |
144 | -moz-appearance: scrollbartrack-vertical; | |
145 | } | |
146 | ||
147 | /* ::::: borders for thumb and buttons ::::: */ | |
148 | ||
149 | html|div thumb, | |
150 | html|div scrollbarbutton { | |
151 | border: 2px solid; | |
152 | -moz-border-top-colors: ThreeDLightShadow ThreeDHighlight; | |
153 | -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow; | |
154 | -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow; | |
155 | -moz-border-left-colors: ThreeDLightShadow ThreeDHighlight; | |
156 | background-color: -moz-Dialog; | |
157 | } | |
158 | ||
159 | /* ::::: thumb (horizontal) ::::: */ | |
160 | ||
161 | html|div thumb { | |
162 | -moz-appearance: scrollbarthumb-vertical; | |
163 | min-height: 8px; | |
164 | } | |
165 | ||
166 | html|div thumb[orient="horizontal"] { | |
167 | -moz-appearance: scrollbarthumb-horizontal; | |
168 | min-width: 8px; | |
169 | } | |
170 | ||
e69db91c | 171 | /* ::::: scrollbar button ::::: */ |
172 | ||
1d4ddf30 | 173 | html|div scrollbarbutton, |
174 | html|div scrollbarbutton[active="true"] { | |
7862e6ee | 175 | background: -moz-Dialog no-repeat 50% 50%; |
e69db91c | 176 | min-width: 16px; |
177 | min-height: 16px; | |
178 | } | |
179 | ||
180 | html|div scrollbarbutton:hover:active { | |
181 | -moz-border-top-colors: ThreeDShadow -moz-Dialog; | |
182 | -moz-border-right-colors: ThreeDShadow -moz-Dialog; | |
183 | -moz-border-bottom-colors: ThreeDShadow -moz-Dialog; | |
184 | -moz-border-left-colors: ThreeDShadow -moz-Dialog; | |
7862e6ee | 185 | background-position: 60% 60%; |
e69db91c | 186 | } |
187 | ||
188 | /* ..... increment .... */ | |
189 | ||
190 | html|div scrollbarbutton[type="increment"] { | |
191 | -moz-appearance: scrollbarbutton-right; | |
192 | background-image: url("chrome://global/skin/arrow/arrow-rit.gif") | |
193 | } | |
194 | ||
195 | html|div scrollbar[orient="vertical"] > scrollbarbutton[type="increment"] { | |
196 | -moz-appearance: scrollbarbutton-down; | |
197 | background-image: url("chrome://global/skin/arrow/arrow-dn.gif") | |
198 | } | |
199 | ||
200 | /* ..... decrement .... */ | |
201 | ||
202 | html|div scrollbarbutton[type="decrement"] { | |
203 | -moz-appearance: scrollbarbutton-left; | |
204 | background-image: url("chrome://global/skin/arrow/arrow-lft.gif") | |
205 | } | |
206 | ||
207 | html|div scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] { | |
208 | -moz-appearance: scrollbarbutton-up; | |
209 | background-image: url("chrome://global/skin/arrow/arrow-up.gif") | |
210 | } | |
211 | ||
212 | } |