2

I want to add flexibility polyfill in my build to support ie8 & 9. Is there a way with gulp to add in the -js-display: flex; before display: flex; as required?

.container {
    -js-display: flex;
    display: flex;
}

https://github.com/10up/flexibility

Thanks!

user1937021
  • 10,151
  • 22
  • 81
  • 143

1 Answers1

4

You can use gulp-postcss in combination with the postcss-flexibility plugin:

var gulp = require('gulp');
var postcss = require('gulp-postcss');
var flexibility = require('postcss-flexibility');

gulp.task('css', function() {
  return gulp.src('src/**/*.css')
    .pipe(postcss([flexibility]))
    .pipe(gulp.dest('dist'));
});
Sven Schoenung
  • 30,224
  • 8
  • 65
  • 70