forked from locomotivemtl/locomotive-scroll
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlocomotive-scroll.css
More file actions
80 lines (71 loc) · 1.92 KB
/
locomotive-scroll.css
File metadata and controls
80 lines (71 loc) · 1.92 KB
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
/*! studio-freight/locomotive-scroll v0.0.8 | MIT License | https://github.com/studio-freight/locomotive-scroll */
html.has-scroll-smooth, html:not(.has-scroll-init) {
overflow: hidden; }
html.has-scroll-dragging {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
html.has-scroll-smooth {
overflow: hidden;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0; }
html:not(.has-scroll-smooth) [data-scroll-section] {
transform: unset !important; }
.has-scroll-smooth body {
overflow: hidden; }
.has-scroll-smooth [data-scroll-container] {
min-height: 100vh; }
[data-scroll-direction='horizontal'] [data-scroll-container] {
height: 100vh;
display: inline-block;
white-space: nowrap; }
[data-scroll-direction='horizontal'] [data-scroll-section] {
display: inline-block;
vertical-align: top;
white-space: nowrap;
height: 100%; }
.c-scrollbar {
position: absolute;
right: 0;
top: 0;
width: 11px;
height: 100%;
transform-origin: center right;
transition: transform 0.3s, opacity 0.3s;
opacity: 0; }
.c-scrollbar:hover {
transform: scaleX(1.45); }
.c-scrollbar:hover,
.has-scroll-scrolling .c-scrollbar,
.has-scroll-dragging .c-scrollbar {
opacity: 1; }
[data-scroll-direction='horizontal'] .c-scrollbar {
width: 100%;
height: 10px;
top: auto;
bottom: 0;
transform: scaleY(1); }
[data-scroll-direction='horizontal'] .c-scrollbar:hover {
transform: scaleY(1.3); }
.c-scrollbar_thumb {
position: absolute;
top: 0;
right: 0;
background-color: black;
opacity: 0.5;
width: 10px;
border-radius: 10px;
border: 2px solid transparent;
background-clip: padding-box;
cursor: -webkit-grab;
cursor: grab; }
.has-scroll-dragging .c-scrollbar_thumb {
cursor: -webkit-grabbing;
cursor: grabbing; }
[data-scroll-direction='horizontal'] .c-scrollbar_thumb {
right: auto;
bottom: 0; }