ai / autoprefixer-core

autoprefixer-core was depreacted, use autoprefixer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prefix not generated for linear-gradient for Safari 6

anilnatha opened this issue · comments

I am using the gulp-autoprefixer package, which is using autoprefixer-core. I originally reported this issue to the devs of gulp-autoprefixer, but was told to report it here.

Based on information on caniuse.com for the linear-gradient CSS property, it should be prefixed for Safari 4 through 6.1 (Safari versions 4-5 have partial support for this property).

The following autoprefixer setup:

.pipe($.autoprefixer({browsers: ['Explorer > 10','Firefox > 25', 'Safari > 6']}))

applied to the following CSS:

.navBar {
    background: linear-gradient(to right, #ba0c2f 0, #410706 100%);
};

generates the following CSS, which should include a webkit prefix, but it does not.

.navBar {
  background: linear-gradient(to right, #ba0c2f 0, #410706 100%);
}

If I alter the autoprefixer setup to be:

.pipe($.autoprefixer({browsers: ['Explorer > 10','Firefox > 25', 'Safari > 5']}))

the css appears to be prefixed as it should be:

.navBar {
  background: -webkit-linear-gradient(left, #ba0c2f 0, #410706 100%);
  background: linear-gradient(to right, #ba0c2f 0, #410706 100%);
}

Is this a problem with autoprefixer, or is the information about prefixing for Safari 6 for the linear-gradient property inaccurate on caniuse.com?

Yeap, it is a bug. It happens because Can I Use merge 6.0 and 6.1. I am trying to fix it.

Ouh. Nope, there is no error :D.

Safari > 6 match only 6.1 and later. Can I Use says, that only 6 need a prefix. It is easy to look to wrong iOS Safari column whene we has 6.1, but it is wrong :).

Use Safari >= 6.