Skip to content

Commit d7ae94a

Browse files
Added custom scroll bar
1 parent 495bebc commit d7ae94a

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

‎src/App.css‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,24 @@ body {
4545
color: var(--primary-font-color);
4646
}
4747

48+
/* Apply to whole page */
49+
body::-webkit-scrollbar {
50+
width: 10px;
51+
}
52+
53+
body::-webkit-scrollbar-track {
54+
background: #f1f1f1;
55+
border-radius: 10px;
56+
}
57+
58+
body::-webkit-scrollbar-thumb {
59+
background: linear-gradient(to bottom, #4e54c8, #8f94fb);
60+
border-radius: 10px;
61+
}
62+
63+
body::-webkit-scrollbar-thumb:hover {
64+
background: linear-gradient(to bottom, #3c40c6, #4e4e8f);
65+
}
4866

4967
h1 {
5068
font-size: 3.2rem;

‎src/components/styles/ReadingMode.css‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
1-
.scroll-none::-webkit-scrollbar-thumb{
2-
display: none;
1+
.custom-scroll {
2+
max-height: 300px;
3+
overflow-y: auto;
34
}
45

6+
/* Custom Scrollbar for the container */
7+
.custom-scroll::-webkit-scrollbar {
8+
width: 8px;
9+
}
10+
11+
.custom-scroll::-webkit-scrollbar-track {
12+
background: #e0e0e0;
13+
border-radius: 10px;
14+
}
15+
16+
.custom-scroll::-webkit-scrollbar-thumb {
17+
background-color: #888;
18+
border-radius: 10px;
19+
}
20+
21+
.custom-scroll::-webkit-scrollbar-thumb:hover {
22+
background: #555;
23+
}
24+
25+
526
.reading-mode-container {
627
transition: all 0.3s ease-in-out;
728
display: grid;

0 commit comments

Comments
 (0)