Answer the question
In order to leave comments, you need to log in
How to correctly convert html/styles for older versions of browsers?
I know there are things like autoprefixer plugins for project build systems like Webpack or Gulp that allow you to prefix your style files and thus support older browsers. For example, we can use this task in Gulp (taken from the Web Starter Kit ):
// Compile and automatically prefix stylesheets
gulp.task('styles', () => {
const AUTOPREFIXER_BROWSERS = [
'ie >= 10',
'ie_mob >= 10',
'ff >= 30',
'chrome >= 34',
'safari >= 7',
'opera >= 23',
'ios >= 7',
'android >= 4.4',
'bb >= 10'
];
// For best performance, don't add Sass partials to `gulp.src`
return gulp.src([
'app/styles/**/*.scss',
'app/styles/**/*.css'
])
.pipe($.newer('.tmp/styles'))
.pipe($.sourcemaps.init())
.pipe($.sass({
precision: 10
}).on('error', $.sass.logError))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp/styles'))
// Concatenate and minify styles
.pipe($.if('*.css', $.cssnano()))
.pipe($.size({title: 'styles'}))
.pipe($.sourcemaps.write('./'))
.pipe(gulp.dest('dist/styles'))
.pipe(gulp.dest('.tmp/styles'));
});
Answer the question
In order to leave comments, you need to log in
Is it true that by simply changing the values in the UTOPREFIXER_BROWSERS settings array, we set support for
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question