Recently, I have been working on customizing scrollbar behavior. However, I have encountered an issue where the scrollbar remains visible even when I am not actively scrolling. This was not the case before applying the below CSS code.
My expectation is that the scrollbar should only be visible when the user is actually scrolling.
MuiCssBaseline: {
styleOverrides: {
body: {
'-webkit-font-smoothing': 'subpixel-antialiased',
},
'*': {
'&::-webkit-scrollbar': {
width: '6px', // Adjusting width
},
'&::-webkit-scrollbar-track': {
background: 'transparent', // Keeping track transparent
},
'&::-webkit-scrollbar-thumb': {
background: '#BDBDBD', // Changing thumb color
borderRadius: '80px', // Customizing border radius
},
'&::-webkit-scrollbar-thumb:hover': {
background: '#A8A8A8', // Optional: Hover effect
},
},