-
Notifications
You must be signed in to change notification settings - Fork 162
/
antiscroll.css
69 lines (59 loc) · 1.46 KB
/
antiscroll.css
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
/*
* Antiscroll: cross-browser native OS X Lion scrollbars
* https://github.com/Automattic/antiscroll
* v0.9
*/
.antiscroll-wrap {
display: inline-block;
position: relative;
overflow: hidden;
}
.antiscroll-scrollbar {
background: gray;
background: rgba(0, 0, 0, 0.5);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
-webkit-box-shadow: 0 0 1px #fff;
-moz-box-shadow: 0 0 1px #fff;
box-shadow: 0 0 1px #fff;
position: absolute;
opacity: 0;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
-webkit-transition: linear 300ms opacity;
-moz-transition: linear 300ms opacity;
-o-transition: linear 300ms opacity;
}
.antiscroll-scrollbar-shown {
opacity: 1;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
}
.antiscroll-scrollbar-horizontal {
height: 7px;
margin-left: 2px;
bottom: 2px;
left: 0;
}
.antiscroll-scrollbar-vertical {
width: 7px;
margin-top: 2px;
right: 2px;
top: 0;
}
.antiscroll-inner {
overflow: scroll;
}
/** A bug in Chrome 25 on Lion requires each selector to have their own
blocks. E.g. the following:
.antiscroll-inner::-webkit-scrollbar, .antiscroll-inner::scrollbar {...}
causes the width and height rules to be ignored by the browser resulting
in both native and antiscroll scrollbars appearing at the same time.
*/
.antiscroll-inner::-webkit-scrollbar {
width: 0;
height: 0;
}
.antiscroll-inner::scrollbar {
width: 0;
height: 0;
}