svnm
svnm

Reputation: 24308

how to add a browser list to cssnext

I am using postcss-cssnext and in my webpack.config I removed autoprefixer

postcss: [autoprefixer({ browsers: ['last 2 versions'] }) ],

and included cssnext. I understand that cssnext already includes autoprefixer so we don't need both included. I am just wondering how I pass in the browserslist to cssnext? This is what I currently have:

postcss: [cssnext()],

Upvotes: 0

Views: 1886

Answers (3)

I am using Gulp.js and here is my code thar run everytime i use postcss-cssnext to auto put vendor prefixes in my CSS styles.

var plugins = [ cssnext({browsers: ['last 2 versions']})];

Upvotes: 0

cameron.townsend
cameron.townsend

Reputation: 106

I ran into this same question with gulp. Here is what I used.

postcss: [cssnext({ browsers: ['last 2 versions'] })]

Upvotes: 2

svnm
svnm

Reputation: 24308

It looks like the options work the same for cssnext: cssnext usage

This is the exact same option that you might know from Autoprefixer. Since cssnext includes Autoprefixer, the option is propagated.

Upvotes: 0

Related Questions