Skip to content

Commit dd49bbf

Browse files
Add files via upload
1 parent ff48ae8 commit dd49bbf

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

scroll.css

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
html.has-scroll-smooth {
2+
overflow: hidden;
3+
}
4+
5+
html.has-scroll-dragging {
6+
-webkit-user-select: none;
7+
-moz-user-select: none;
8+
-ms-user-select: none;
9+
user-select: none;
10+
}
11+
12+
.has-scroll-smooth body {
13+
overflow: hidden;
14+
}
15+
16+
.has-scroll-smooth [data-scroll-container] {
17+
min-height: 100vh;
18+
}
19+
20+
[data-scroll-direction="horizontal"] [data-scroll-container] {
21+
height: 100vh;
22+
display: inline-block;
23+
white-space: nowrap;
24+
}
25+
26+
[data-scroll-direction="horizontal"] [data-scroll-section] {
27+
display: inline-block;
28+
vertical-align: top;
29+
white-space: nowrap;
30+
height: 100%;
31+
}
32+
33+
.c-scrollbar {
34+
position: absolute;
35+
right: 0;
36+
top: 0;
37+
width: 11px;
38+
height: 100%;
39+
transform-origin: center right;
40+
transition: transform 0.3s, opacity 0.3s;
41+
opacity: 0;
42+
}
43+
44+
.c-scrollbar:hover {
45+
transform: scaleX(1.45);
46+
}
47+
48+
.c-scrollbar:hover, .has-scroll-scrolling .c-scrollbar, .has-scroll-dragging .c-scrollbar {
49+
opacity: 1;
50+
}
51+
52+
[data-scroll-direction="horizontal"] .c-scrollbar {
53+
width: 100%;
54+
height: 10px;
55+
top: auto;
56+
bottom: 0;
57+
transform: scaleY(1);
58+
}
59+
60+
[data-scroll-direction="horizontal"] .c-scrollbar:hover {
61+
transform: scaleY(1.3);
62+
}
63+
64+
.c-scrollbar_thumb {
65+
position: absolute;
66+
top: 0;
67+
right: 0;
68+
background-color: black;
69+
opacity: 0.5;
70+
width: 7px;
71+
border-radius: 10px;
72+
margin: 2px;
73+
cursor: -webkit-grab;
74+
cursor: grab;
75+
}
76+
77+
.has-scroll-dragging .c-scrollbar_thumb {
78+
cursor: -webkit-grabbing;
79+
cursor: grabbing;
80+
}
81+
82+
[data-scroll-direction="horizontal"] .c-scrollbar_thumb {
83+
right: auto;
84+
bottom: 0;
85+
}

0 commit comments

Comments
 (0)