T
T
tytkawa2015-04-23 16:53:48
gulp.js
tytkawa, 2015-04-23 16:53:48

How to configure gulp-autoprefixer for Gulp?

Connected gulp-autoprefixer and wrote the following code

.nav {
  background: linear-gradient(top, #0b2267, #07133c);
}

at the exit:
.nav {
  background: -webkit-linear-gradient(top, #0b2267, #07133c);
  background: linear-gradient(top, #0b2267, #07133c); }

In FireFox v37.0.2 (the latest at the moment) a prefix is ​​needed, so it is not displayed. How to solve this problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MhMadHamster, 2015-04-24
@tytkawa

autoprefixer focuses on this resource , according to which the fox for the last 20 versions does not need a vendor prefix for the gradient, but if you really want to, you can write something like:
.pipe(prefix({ browsers: ['last 25 versions'] }))

A
Artem Pavliienko, 2017-10-05
@kvazarmp

here is my code

gulp.task('sass:watch', function() {
    gulp.watch('./project/**/*.scss', ['sass']);
    gulp.src('./project/**/*.scss')
        .pipe(sass().on('error', sass.logError))
        .pipe(autoprefixer({
            browsers: ['last 4 versions']
        }))
        .pipe(gulp.dest('./project/css/'))
});

When I turn everything on, it adds prefixes. But when I change scss and save, all prefixes are lost. Tell me what's the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question