sindresorhus / gulp-autoprefixer

Prefix CSS
MIT License
692 stars 50 forks source link

Autoprefixer is not working? #112

Closed SafaElmali closed 3 years ago

SafaElmali commented 5 years ago

I am trying to use autoprefixer but I think it doesn't work.

Here my sass file

.testing {
    display: flex;
    width: percentage(5/7);
}

Here is my gulp task

//Gulp Sass to CSS
gulp.task('sass', async function() {
    gulp.src('app/scss/styles.scss') 
        .pipe(sass()) 
        .pipe(autoprefixer()) 
        .pipe(gulp.dest('app/css'))
});

Output of CSS file

.testing {
  display: flex;
  width: 71.42857%; }

Shouldn't it be like the below?

.testing {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  width: 71.42857%; 
}
igoradamenko commented 5 years ago

@SafaElmali, have you added browserslist config?

https://github.com/browserslist/browserslist#browserslist-

CountryGuide commented 5 years ago

Same problem for me added "browserslist": ["last 2 versions"] in package.json