Skip to content

Autoprefixer cannot generate prefix for custom scrollbar #821

@sarazhang123

Description

@sarazhang123

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions