Skip to content

Commit 0e10231

Browse files
feat: update scrollbar color for dark mode
1 parent 3438194 commit 0e10231

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

src/app/homepage/homepage.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</div>
1010
</app-header>
1111
<div class="container-fluid">
12-
<app-menu [class.opened]="isSidebarOpened"></app-menu>
12+
<app-menu [class.opened]="isSidebarOpened" class="app-menu"></app-menu>
1313
<div class="container" [class.wide]="!isSidebarOpened">
1414
<div class="page-wrapper">
1515
<app-toc [contentReference]="contentRef"></app-toc>

src/styles.scss

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,47 @@
1616

1717
html[mode='dark'] {
1818
@extend .dark-mode;
19+
20+
::-webkit-scrollbar {
21+
width: 10px;
22+
}
23+
24+
::-webkit-scrollbar-thumb {
25+
background: #494951 !important;
26+
border-radius: 6px;
27+
}
28+
29+
::-webkit-scrollbar-thumb:hover {
30+
background: #6d6d6d;
31+
}
32+
33+
::-webkit-scrollbar-track {
34+
background: var(--background-3dp);
35+
}
36+
37+
::-webkit-scrollbar-corner {
38+
background: var(--background-3dp);
39+
}
40+
41+
.app-menu {
42+
&::-webkit-scrollbar {
43+
width: 6px;
44+
}
45+
}
46+
47+
.app-menu:not(:hover) {
48+
&::-webkit-scrollbar-thumb {
49+
background: var(--menu-background) !important;
50+
}
51+
52+
&::-webkit-scrollbar-track {
53+
background: var(--menu-background);
54+
}
55+
56+
&::-webkit-scrollbar-corner {
57+
background: var(--menu-background);
58+
}
59+
}
1960
}
2061

2162
html:not([mode='dark']):not([mode='light']),

0 commit comments

Comments
 (0)