summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/mobile/global/scrollbars.css
blob: 7ae8bced9dd158ced6d18e6c8a3f333d0fada957 (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
/* 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|scrollbar[root="true"] {
  position: relative;
  z-index: 2147483647;
}

xul|scrollbar {
  appearance: none;
  pointer-events: none;
  display: block;
}

/* We don't show resizers on android, so they may as well have
 * pointer-events: none to simplify scrollbar caching */
xul|resizer,
xul|scrollcorner {
  pointer-events: none;
}

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

xul|scrollbar[orient="vertical"] xul|thumb {
  appearance: none;
  max-width: 2px;
  min-width: 2px;
}

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

xul|scrollbar[orient="horizontal"] xul|thumb {
  appearance: none;
  max-height: 2px;
  min-height: 2px;
}

xul|scrollbar:not([active="true"]),
xul|scrollbar[disabled] {
  /* Mac and Windows with overlay scrollbars use visibility: hidden here, but
   * that breaks the scrollbar style caching, see bug 1620866. */
  opacity: 0;
}

xul|scrollbarbutton {
  appearance: none;
  min-height: 6px;
  min-width: 6px;
  visibility: hidden;
}

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

xul|scrollbar xul|thumb {
  background-color: rgba(119, 119, 119, 0.4);
  border-radius: 4px;
}

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