Skip to content

Commit 60afce4

Browse files
committed
Use dark background color for documentation scrollbar when in dark-mode
1 parent 8a01d50 commit 60afce4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

gradle/dokka/custom-styles.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
.navigation-controls--btn_homepage {
22
background-image: url("../images/github-icon.svg")
33
}
4+
5+
/*
6+
By default, scrollbars in Dokka have a light background even when in dark-mode. So we override that
7+
here to set the scrollbar background color to dark when in dark-mode (using the `theme-dark` class
8+
that Dokka sets on the `html` element when in dark-mode).
9+
*/
10+
.theme-dark {
11+
/* Scrollbar customization in Firefox - Chrome/Safari use -webkit-scrollbar below */
12+
scrollbar-color: #525257 #262628;
13+
}
14+
15+
.theme-dark::-webkit-scrollbar-thumb {
16+
background: #525257;
17+
}
18+
19+
.theme-dark::-webkit-scrollbar-track {
20+
background: #262628;
21+
}

0 commit comments

Comments
 (0)