This is my first question.
node version: v4.4.4
package.json
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-rename": "^1.2.2",
gulpfile.js
gulp.task('auto', function () {
log("Generate CSS files");
return gulp.src('dev/css/test.css')
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(rename('asd.css'))
.pipe(gulp.dest('dev/css'));
});
test.css
p { transition: all 5s ease; }
a { transform: scale(0.5); }
asd.css
p { transition: all 5s ease; }
a { transform: scale(0.5); }
Why it doesn't work? The result is the same. This doesn't add prefixes.
Thanks in advance ;)
I'm pretty certain that (as of this writing) the last 2 versions don't require prefixes for those particular rules. Try adding
user-select
as prefixes are still required for that rule.Autoprefixer will only add the prefixes that are necessary to support the browsers that you tell it you need to support. As browsers continue to drop prefixes, the number of prefixes that autoprefixer adds will diminish until it is hopefully no longer necessary as a tool.