Is there a way to add opacity to scrollbar track?
When I add the keyword opacity:0.5
it seems to not do anything...
I used material ui styled, but I dont think it has anything to do with it.
const Root = styled('div')(({ theme }) => ({
display: 'flex',
overflow: 'auto',
maxHeight: '750px',
'&::-webkit-scrollbar, & *::-webkit-scrollbar': {
width: '12px',
},
'&::-webkit-scrollbar-track': {
boxShadow: 'inset 0 0 6px rgba(0, 0, 0, 0.3)',
borderRadius: '10px',
opacity: '0.5', // --> this is not apply.
backgroundColor: theme.palette.primary.main,
},
'&::-webkit-scrollbar-thumb': {
boxShadow: 'inset 0 0 6px rgba(0, 0, 0, 0.3)',
borderRadius: '10px',
backgroundColor: theme.palette.primary.main,
},
}));
and because I use styled component, built in theme I want the theme to be consistent when I change it to darkmode.
so my question is if there is a way to add opcaity to the theme.palette.primary.main
without the keyword opacity.