Andrew
Andrew

Reputation: 5715

What browsers does autoprefixer target for 'last 2 versions'?

Running a autoprefixer task though grunt with 'last 2 version' under browsers. What browsers is this targeting? I would assume this means the last 2 versions of all browsers but I can't see any -moz prefixes in the CSS output.

grunt.config('autoprefixer', {
    options: {
      browsers: ['last 2 version']
    },
    dist: {
      expand: true,
      src: '/styles/app.css'
    }
  });

Upvotes: 3

Views: 1957

Answers (3)

It should probably be 'last 2 versions'. (You're missing and s at the end!)

When I tried 'last 2 versions', and then compared the resulting CSS file with the one from 'last 50 versions', the result was identical, so the number of versions doesn't seem to matter (much).

Upvotes: 0

KevinH
KevinH

Reputation: 1144

On Browserlist you can see, which browsers are currently meant by 'last 2 versions' Link.

Upvotes: 4

Rakhat
Rakhat

Reputation: 4942

'Last 2 versions' means - support latest stable version (not beta or nightly builds) and one version earlier.

Upvotes: 3

Related Questions