I am very new to Gulp and have never used any plugins before so I'm a bit lost.
I have followed some tutorials and just about managed to get Gulp running and the auto-prefixer plugin. I am now just trying to work out if there is a way to get it it prefix for all versions of all browsers?
On this browser list, I can select things like the last 2 versions of all major browsers, or a range of versions, but I would like to select all versions of all browsers (major and other). I am especially trying to add support for the default Samsung browser, as I am having some browser patibility issues with that at the moment and am hoping some prefixes could be the solution.
Here is the code I have so far:
var gulp = require('gulp');
var prefix = require('gulp-autoprefixer');
gulp.task('prefix', function () {
gulp.src('css/**/*.css')
.pipe(prefix('last 2 versions'))
.pipe(gulp.dest('css/'));
});
gulp.task('default', ['prefix']);
Thanks
I am very new to Gulp and have never used any plugins before so I'm a bit lost.
I have followed some tutorials and just about managed to get Gulp running and the auto-prefixer plugin. I am now just trying to work out if there is a way to get it it prefix for all versions of all browsers?
On this browser list, I can select things like the last 2 versions of all major browsers, or a range of versions, but I would like to select all versions of all browsers (major and other). I am especially trying to add support for the default Samsung browser, as I am having some browser patibility issues with that at the moment and am hoping some prefixes could be the solution.
Here is the code I have so far:
var gulp = require('gulp');
var prefix = require('gulp-autoprefixer');
gulp.task('prefix', function () {
gulp.src('css/**/*.css')
.pipe(prefix('last 2 versions'))
.pipe(gulp.dest('css/'));
});
gulp.task('default', ['prefix']);
Thanks
Share Improve this question asked Mar 28, 2017 at 8:52 mrseanbainesmrseanbaines 8332 gold badges15 silver badges26 bronze badges 4- Is the Samsung browser just android mobile? – Duderino9000 Commented Mar 28, 2017 at 17:34
- @Barryman9000 Nope. It's a tablet - Samsung Galaxy 8.0, Android version 4.4.2, browser version 4.4.2 – mrseanbaines Commented Mar 28, 2017 at 18:25
- It seems strange that a newer Samsung browser wouldn't fall under the "modern browsers" level of support. You can try visiting html5test. to see what's lacking – Duderino9000 Commented Mar 28, 2017 at 22:29
- Oh... I guess android 4.4 is older. My bad – Duderino9000 Commented Mar 28, 2017 at 22:31
1 Answer
Reset to default 5You can find a list of all the prefix options here. I'm not sure there's anything to target a Samsung browser specifically
https://github./ai/browserslist#queries
So an example autoprefixer task might look like this
let autoprefixBrowsers = ['> 1%', 'last 2 versions', 'firefox >= 4', 'safari 7', 'safari 8', 'IE 8', 'IE 9', 'IE 10', 'IE 11'];
gulp.task('prefix', function () {
gulp.src('css/**/*.css')
.pipe(prefix({ browsers: autoprefixBrowsers }))
.pipe(gulp.dest('css/'));
});