Show scroll bar on hover only

Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
Philipp Hugenroth
2021-07-06 14:01:23 +02:00
parent 5cbce346bb
commit 76bb7aeda0
2 changed files with 12 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Show scroll bar of the sidebar wrapper only on hover
@@ -299,12 +299,17 @@ export const SidebarScrollWrapper = styled('div')(({ theme }) => ({
// Display at least one item in the container
// Question: Can this be a config/theme variable - if so, which? :/
minHeight: '48px',
'&::-webkit-scrollbar': {
overflowY: 'hidden',
'&:hover': {
overflowY: 'auto',
},
'&:hover::-webkit-scrollbar': {
backgroundColor: theme.palette.background.default,
width: '5px',
borderRadius: '5px',
},
'&::-webkit-scrollbar-thumb': {
'&:hover::-webkit-scrollbar-thumb': {
backgroundColor: theme.palette.text.hint,
borderRadius: '5px',
},