Autoprefixer cannot generate prefix for custom scrollbar
See original GitHub issueI 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?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:9 (4 by maintainers)
Top Results From Across the Web
javascript - ::-webkit-scrollbar not working on firefox
I highly recommend you add something like Autoprefixer to your build pipeline. It will manage adding prefixes where needed, not adding them ...
Read more >Is Vendor Prefixing Dead? - CSS-Tricks
In CSS we use vendor prefixes for properties, values, @-rules that are: ... scollbar-width, Methods of styling scrollbar color and width.
Read more >Configure Autoprefixer correctly to output -ms-grid prefixes.
Goal 1: Ensure your build tasks have Autoprefixer enabled and configured to generate grid vendor prefixes. If you're using Laravel Mix, ...
Read more >Create custom scrollbars using CSS - YouTube
Having a custom scrollbar can help tie the branding of a site together on the page, as well as help it match an...
Read more >Sass mixin for scrollbar styling - CodePen
Because I can't ever remember the right syntax for scrollbars styling in WebKit, here is a little Sass mixin to do it for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
for information, there is ongoing work on this here : https://github.com/pascalduez/postcss-scrollbar
@Malvoz my current worries:
Because of these reasons, I do not want to do it on my own. But I will help you make a pull request and will accept and release it.