fix: scrollbars pick up the theme in dark mode

Signed-off-by: Navya Govind <ngovind@bol.com>
This commit is contained in:
Navya Govind
2024-04-11 17:41:24 +02:00
parent dd44406163
commit f1462df39a
2 changed files with 21 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/theme': patch
---
Fixed bug where scrollbars don't pick up the theme when in dark mode
@@ -34,6 +34,22 @@ export const defaultComponentThemes: ThemeOptions['components'] = {
overscrollBehaviorY: 'none',
fontSize: '0.875rem',
lineHeight: 1.43,
'&::-webkit-scrollbar, & *::-webkit-scrollbar': {
backgroundColor: theme.palette.background.paper,
width: '1em',
},
'&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb': {
borderRadius: 8,
backgroundColor: theme.palette.textVerySubtle,
border: `3px solid ${theme.palette.background.paper}`,
},
'&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active':
{
backgroundColor:
theme.palette.mode === 'dark'
? lighten(theme.palette.textVerySubtle, 0.2)
: darken(theme.palette.textVerySubtle, 0.2),
},
},
a: {
color: 'inherit',