Skip to content

Commit

Permalink
feat: add custom scrollbar css to light mode
Browse files Browse the repository at this point in the history
note: `html::-webkit-scrollbar` is used because a top level `::-webkit-scrollbar` would override the `html.dark::-webkit-scrollbar` style even with `!important`
  • Loading branch information
Araxeus committed Jun 16, 2024
1 parent 7a83f81 commit f600cdf
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,23 @@
-webkit-user-select: none;
}

html.dark::-webkit-scrollbar,
html.dark div.flex-grow::-webkit-scrollbar {
html::-webkit-scrollbar,
div.flex-grow::-webkit-scrollbar {
width: 10px;
}

html::-webkit-scrollbar-thumb,
div.flex-grow::-webkit-scrollbar-thumb {
background-color: #c1c1c1;
border-radius: 10px;
}

html::-webkit-scrollbar-thumb:hover,
div.flex-grow::-webkit-scrollbar-thumb:hover {
background-color: #a8a8a8;
border-radius: 10px;
}

html.dark::-webkit-scrollbar-track,
html.dark div.flex-grow::-webkit-scrollbar-track {
background-color: #090E15;
Expand All @@ -38,13 +50,11 @@
html.dark::-webkit-scrollbar-thumb,
html.dark div.flex-grow::-webkit-scrollbar-thumb {
background-color: #24292e;
border-radius: 10px;
}

html.dark::-webkit-scrollbar-thumb:hover,
html.dark div.flex-grow::-webkit-scrollbar-thumb:hover {
background-color: #3a3f44;
border-radius: 10px;
}

body {
Expand Down

0 comments on commit f600cdf

Please sign in to comment.