Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I target IE9 and above with grunt autoprefixer?

How do I target IE9 and above with grunt autoprefixer? Can I do something like the following:

  grunt.config('autoprefixer', {
    options: {
      browsers: ['IE9+']
    },
    dist: {
      expand: true,
      src: '/styles/app.css'
    }
  });
like image 402
Andrew Avatar asked Jul 22 '14 04:07

Andrew


1 Answers

The syntax for the browsers option can be found in the main Autoprefixer documentation. The relevant bits are:

  • Firefox >= 20 is Firefox version 20 or newer.

And:

Browsers names (case insensitive):

  • ...
  • Explorer or ie for Internet Explorer.

Hence, in order to target IE9 and newer, use:

options: {
  browsers: ['ie >= 9']
},
like image 168
BoltClock Avatar answered Nov 14 '22 05:11

BoltClock