Autoprefixer cannot generate prefix for custom scrollbar
Author: sarazhang123Created Apr 17, 2017Updated Jul 25, 2023
Labelsenhancement
I use grunt-postcss to generate css prefix.
Configuration as follows:
processors: [
require('autoprefixer') {
browsers: [
'> 0.04%'
]
}
]
Sass as follows:
@mixin custom-scroll($thumb-bgcolor: $gray-background-color, $track-bgcolor: $white-background-color) {
&::scrollbar {
background-color: transparent;
width: 5px;
height: 5px;
}
&::scrollbar-thumb {
background: $thumb-bgcolor;
border-radius: 2px;
min-height: 6px;
width: 4px;
}
&::scrollbar-track {
background: $track-bgcolor;
border-radius: 2px;
}
}
But, autoprefixer cannot generate prefix for scrollbar-xxx, such as -webkit-scrollbar, -webkit-scrollbar-thumb, -webkit-scrollbar-track. It is a bug or it is my wrong configuration?
Source: postcss/autoprefixer