Skip to content

Commit e684999

Browse files
committed
utils scrollbar
1 parent 46c5dd1 commit e684999

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

src/css/bundle.css

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,47 @@ body.typography-bold {
513513
}
514514

515515

516+
/* --- scrollbar.css --- */
517+
html, body {
518+
scrollbar-width: thin; /* For Firefox */
519+
scrollbar-color: var(--neutral-300) var(--neutral-50); /* Thumb and Track */
520+
}
521+
522+
/* Webkit-based Browsers */
523+
html::-webkit-scrollbar, body::-webkit-scrollbar {
524+
width: 12px; /* Vertical scrollbar width */
525+
height: 12px; /* Horizontal scrollbar height */
526+
background-color: var(--neutral-50); /* Track background */
527+
}
528+
529+
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
530+
background-color: var(--neutral-300); /* Thumb color */
531+
border-radius: var(--radius-lg); /* Rounded corners for thumb */
532+
border: 3px solid var(--neutral-50); /* Creates a spacing effect */
533+
}
534+
535+
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover {
536+
background-color: var(--neutral-400); /* Slightly darker thumb on hover */
537+
}
538+
539+
html::-webkit-scrollbar-thumb:active, body::-webkit-scrollbar-thumb:active {
540+
background-color: var(--neutral-500); /* Even darker thumb on active */
541+
}
542+
543+
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track {
544+
background-color: var(--neutral-50); /* Track background */
545+
border-radius: var(--radius-md);
546+
}
547+
548+
/* Responsive Adjustments */
549+
@media (max-width: 768px) {
550+
html::-webkit-scrollbar, body::-webkit-scrollbar {
551+
width: 8px;
552+
height: 8px;
553+
}
554+
}
555+
556+
516557
/* --- sections.css --- */
517558
/* Base Section Styling */
518559
section {

src/css/utils/scrollbar.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
html, body {
2+
scrollbar-width: thin; /* For Firefox */
3+
scrollbar-color: var(--neutral-300) var(--neutral-50); /* Thumb and Track */
4+
}
5+
6+
/* Webkit-based Browsers */
7+
html::-webkit-scrollbar, body::-webkit-scrollbar {
8+
width: 12px; /* Vertical scrollbar width */
9+
height: 12px; /* Horizontal scrollbar height */
10+
background-color: var(--neutral-50); /* Track background */
11+
}
12+
13+
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
14+
background-color: var(--neutral-300); /* Thumb color */
15+
border-radius: var(--radius-lg); /* Rounded corners for thumb */
16+
border: 3px solid var(--neutral-50); /* Creates a spacing effect */
17+
}
18+
19+
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover {
20+
background-color: var(--neutral-400); /* Slightly darker thumb on hover */
21+
}
22+
23+
html::-webkit-scrollbar-thumb:active, body::-webkit-scrollbar-thumb:active {
24+
background-color: var(--neutral-500); /* Even darker thumb on active */
25+
}
26+
27+
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track {
28+
background-color: var(--neutral-50); /* Track background */
29+
border-radius: var(--radius-md);
30+
}
31+
32+
/* Responsive Adjustments */
33+
@media (max-width: 768px) {
34+
html::-webkit-scrollbar, body::-webkit-scrollbar {
35+
width: 8px;
36+
height: 8px;
37+
}
38+
}

0 commit comments

Comments
 (0)