summaryrefslogtreecommitdiffstats
path: root/b2g/chrome/content/content.css
blob: bb478087e83d78b7ad61b28d195687612d6fe9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@namespace url("http://www.w3.org/1999/xhtml");
@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* Style the scrollbars */
xul|window xul|scrollbar {
  display: none;
}

/* Bug 1041576 - Scrollable with scrollgrab should not have scrollbars */

@-moz-document domain(system.gaiamobile.org) {
  .browser-container > xul|scrollbar {
    display: none;
  }
}

%ifdef MOZ_GRAPHENE
.moz-noscrollbars > xul|scrollbar {
  display: none;
}
%endif

xul|scrollbar[root="true"] {
  position: relative;
  z-index: 2147483647;
}

xul|scrollbar {
  -moz-appearance: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0px solid transparent !important;
  pointer-events: none;
}

/* Scrollbar code will reset the margin to the correct side depending on
   where layout actually puts the scrollbar */
xul|scrollbar[orient="vertical"] {
  margin-left: -8px;
  min-width: 8px;
  max-width: 8px;
}

xul|scrollbar[orient="vertical"] xul|thumb {
  max-width: 6px !important;
  min-width: 6px !important;
}

xul|scrollbar[orient="horizontal"] {
  margin-top: -8px;
  min-height: 8px;
  max-height: 8px;
}

xul|scrollbar[orient="horizontal"] xul|thumb {
  max-height: 6px !important;
  min-height: 6px !important;
}

xul|scrollbar:not([active="true"]),
xul|scrollbar[disabled] {
  opacity: 0;
}

xul|scrollbarbutton {
  min-height: 8px !important;
  min-width: 8px !important;
  -moz-appearance: none !important;
  visibility: hidden;
}

xul|scrollbarbutton[sbattr="scrollbar-up-top"],
xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] {
  display: none;
}

xul|thumb {
  background-color: rgba(0, 0, 0, 0.4) !important;
  -moz-border-top-colors: none !important;
  -moz-border-bottom-colors: none !important;
  -moz-border-right-colors: none !important;
  -moz-border-left-colors: none !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 3px;
}

xul|scrollbarbutton {
  background-image: none !important;
}

%ifndef MOZ_GRAPHENE
/* -moz-touch-enabled? media elements */
:-moz-any(video, audio) > xul|videocontrols {
  -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControlsGonk");
}

select:not([size]):not([multiple]) > xul|scrollbar,
select[size="1"] > xul|scrollbar,
select:not([size]):not([multiple]) xul|scrollbarbutton,
select[size="1"] xul|scrollbarbutton {
  display: block;
  margin-left: 0;
  min-width: 16px;
}

/* Override inverse OS themes */
select,
textarea,
button,
xul|button,
* > input:not([type="image"]) {
  -moz-appearance: none !important;  /* See bug 598421 for fixing the platform */
  border-radius: 3px;
}

select[size],
select[multiple],
select[size][multiple],
textarea,
* > input:not([type="image"]) {
  border-style: solid;
  border-color: #7d7d7d;
  color: #414141;
  background-color: white;
}

/* Selects are handled by the form helper, see bug 685197 */
select option, select optgroup {
  pointer-events: none;
}

select:not([size]):not([multiple]),
select[size="0"],
select[size="1"],
* > input[type="button"],
* > input[type="submit"],
* > input[type="reset"],
button {
  border-style: solid;
  border-color: #7d7d7d;
  color: #414141;
  background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(215,215,215,0.5) 18px, rgba(115,115,115,0.5) 100%);
}

input[type="checkbox"] {
  background-color: white;
}

input[type="radio"] {
  background-color: white;
}

select {
  border-width: 1px;
  padding: 1px;
}

select:not([size]):not([multiple]),
select[size="0"],
select[size="1"] {
  padding: 0 1px 0 1px;
}

* > input:not([type="image"]) {
  border-width: 1px;
  padding: 1px;
}

textarea {
  resize: none;
  border-width: 1px;
  padding-inline-start: 1px;
  padding-inline-end: 1px;
  padding-block-start: 2px;
  padding-block-end: 2px;
}

input[type="button"],
input[type="submit"],
input[type="reset"],
button {
  border-width: 1px;
  padding-inline-start: 7px;
  padding-inline-end: 7px;
  padding-block-start: 0;
  padding-block-end: 0;
}

input[type="radio"],
input[type="checkbox"] {
  border: 1px solid #a7a7a7 !important;
  padding-inline-start: 1px;
  padding-inline-end: 1px;
  padding-block-start: 2px;
  padding-block-end: 2px;
}

select > button {
  border-width: 0px !important;
  margin: 0px !important;
  padding: 0px !important;
  border-radius: 0;
  color: #414141;

  background-image: radial-gradient(at bottom left, #bbbbbb 40%, #f5f5f5), url(arrow.svg) !important;
  background-color: transparent;
  background-position: -15px center, 4px center !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: 100% 90%, auto auto;

  -moz-binding: none !important;
  position: relative !important;
  font-size: inherit;
}

select[size]:focus,
select[multiple]:focus,
select[size][multiple]:focus,
textarea:focus,
input[type="file"]:focus > input[type="text"],
* > input:not([type="image"]):focus {
  outline: 0px !important;
  border-style: solid;
  border-color: rgb(94,128,153);
  background-color: white;
}

select:not([size]):not([multiple]):focus,
select[size="0"]:focus,
select[size="1"]:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus,
button:focus {
  outline: 0px !important;
  border-style: solid;
  border-color: rgb(94,128,153);
  background: white linear-gradient(rgba(255,255,255,0.2) 0, rgba(198,225,256,0.2) 18px, rgba(27,113,177,0.5) 100%);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  border-color: #99c6e0 !important;
}

/* we need to be specific for selects because the above rules are specific too */
textarea[disabled],
select[size][disabled],
select[multiple][disabled],
select[size][multiple][disabled],
select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled],
button[disabled],
* > input:not([type="image"])[disabled] {
  color: rgba(0,0,0,0.3);
  border-color: rgba(125,125,125,0.4);
  border-style: solid;
  border-width: 1px;
  background-color: #f5f5f5;
}

select:not([size]):not([multiple])[disabled],
select[size="0"][disabled],
select[size="1"][disabled] {
  background-color: #f5f5f5;
}

input[type="button"][disabled],
input[type="submit"][disabled],
input[type="reset"][disabled],
button[disabled] {
  padding-inline-start: 7px;
  padding-inline-end: 7px;
  padding-block-start: 0;
  padding-block-end: 0;
  background-color: #f5f5f5;
}

input[type="radio"][disabled],
input[type="radio"][disabled]:active,
input[type="radio"][disabled]:hover,
input[type="radio"][disabled]:hover:active,
input[type="checkbox"][disabled],
input[type="checkbox"][disabled]:active,
input[type="checkbox"][disabled]:hover,
input[type="checkbox"][disabled]:hover:active {
  border:1px solid rgba(125,125,125,0.4) !important;
}

select[disabled] > button {
  opacity: 0.6;
  padding: 1px 7px 1px 7px;
}

*:any-link:active,
*[role=button]:active,
button:active,
option:active,
select:active,
label:active {
  background-color: rgba(141, 184, 216, 0.5);
}

input[type=number] > div > div, /* work around bug 946184 */
input[type=number]::-moz-number-spin-box {
  display: none;
}
%endif

%ifdef MOZ_WIDGET_GONK
/* This binding only provide key shortcuts that we can't use on devices */
input,
textarea {
-moz-binding: none !important;
}
%endif