Skip to content

Commit 3f7e147

Browse files
committed
safari: Add custom background for scrollbars in dark mode
Introduces a transparent background for .scrollbar-custom scrollbars and sets a dark background in dark mode using ::-webkit-scrollbar selectors.
1 parent 597703a commit 3f7e147

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/styles/main.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@
3232
@apply scrollbar-thin scrollbar-track-transparent scrollbar-thumb-black/10 scrollbar-thumb-rounded-full scrollbar-w-1 hover:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/10 dark:hover:scrollbar-thumb-white/20;
3333
}
3434

35+
.scrollbar-custom::-webkit-scrollbar {
36+
background-color: transparent;
37+
width: 8px;
38+
height: 8px;
39+
}
40+
41+
.dark .scrollbar-custom::-webkit-scrollbar {
42+
background-color: rgba(17, 17, 17, 0.85);
43+
}
44+
3545
/* Rounded top/bottom caps for vertical scrollbars (Chrome/Edge/Safari) */
3646
.scrollbar-custom::-webkit-scrollbar-track {
3747
@apply rounded-full bg-clip-padding; /* clip bg to padding so caps look round */

0 commit comments

Comments
 (0)