-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update scrollbars to match theme (#1128)
* Use new scrollbar styles based on latest standards. * Properly apply styles to body and html, so scrollbars know how to get their colors. * Fix search container so scrollbar knows where to get its color * Fix scrollbar bg color in Kapa modal.
- Loading branch information
1 parent
69573b2
commit ba5041d
Showing
4 changed files
with
44 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
/* Improve scrollbars on Chrome + Windows/Linux. */ | ||
body:not(.mac) { | ||
@supports (scrollbar-color: #000 #111) { | ||
* { | ||
scrollbar-width: thin; | ||
scrollbar-color: transparent transparent; | ||
} | ||
|
||
:hover { | ||
scrollbar-color: theme("colors.gray.40") transparent; | ||
} | ||
|
||
.dark:hover, | ||
.dark :hover { | ||
scrollbar-color: theme("colors.gray.70") transparent; | ||
} | ||
} | ||
|
||
@supports not (scrollbar-color: #000 #111) { | ||
::-webkit-scrollbar { | ||
height: 6px; | ||
width: 6px; | ||
background: transparent; | ||
@apply h-2 w-2 bg-transparent; | ||
} | ||
|
||
::-webkit-scrollbar-thumb:horizontal { | ||
margin-top: -6px; | ||
::-webkit-scrollbar-thumb { | ||
@apply rounded-full; | ||
} | ||
|
||
::-webkit-scrollbar-thumb:active { | ||
opacity: 1; | ||
background-color: rgba(128, 132, 149, 0.75); | ||
:hover::-webkit-scrollbar-thumb { | ||
@apply bg-gray-50 bg-opacity-70; | ||
} | ||
|
||
::-webkit-scrollbar-thumb:hover, | ||
:hover::-webkit-scrollbar-thumb:horizontal, | ||
:hover::-webkit-scrollbar-thumb:vertical { | ||
border-radius: 9999px; | ||
opacity: 1; | ||
background-color: rgba(191, 197, 211, 0.75); | ||
:hover::-webkit-scrollbar-thumb:hover { | ||
@apply bg-gray-50 bg-opacity-100; | ||
} | ||
|
||
::-webkit-scrollbar-thumb:active, | ||
:hover::-webkit-scrollbar-thumb:active { | ||
@apply bg-gray-70 bg-opacity-100; | ||
} | ||
} |