Autoprefixer: Autoprefixer generically adds prefixes to browser-specific pseudo-classes

Created on 27 May 2019  路  5Comments  路  Source: postcss/autoprefixer

Hi, how to block autoprefixer from adding -webkit prefixes to a Mozilla specific extension ?

Here are some examples to make my point :

.custom-range::-moz-range-thumb {
    -webkit-transition: none;
    transition: none
}

-webkit-transition has nothing to do here as it is a Mozilla specific selector (::-moz-range-thumb).

Another crazy output happens with keyframes and transitions, as Autoprefixer creates useless variants

  -webkit-transition: -webkit-box-shadow 0.1s ease-out;
  transition: -webkit-box-shadow 0.1s ease-out;
  transition: box-shadow 0.1s ease-out;
  transition: box-shadow 0.1s ease-out, -webkit-box-shadow 0.1s ease-out;

Instead of just

  -webkit-transition: -webkit-box-shadow 0.1s ease-out;
  transition: box-shadow 0.1s ease-out;

How to fix this ? Thanks for your help. And thanks a lot for Autoprefixer !!!

enhancement

Most helpful comment

how to block autoprefixer from adding -webkit prefixes to a Mozilla specific extension ?

Yeap, it will be nice to avoid webkit prefixes in :-moz- rules.

But I will not have time for it in next weeks. Feel free to send PR. You can look how we do it for keyframes

All 5 comments

how to block autoprefixer from adding -webkit prefixes to a Mozilla specific extension ?

Yeap, it will be nice to avoid webkit prefixes in :-moz- rules.

But I will not have time for it in next weeks. Feel free to send PR. You can look how we do it for keyframes

-webkit-transition: -webkit-box-shadow 0.1s ease-out;
transition: box-shadow 0.1s ease-out;

It will not work if transition will lost prefix before box-shadow

Thx a lot.
I'll try to look at the code but I'm not a dev at all.
I'll surely wait ;-)

I'm gonna look at it.

Released in 9.7.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Vidhya-Dilip picture Vidhya-Dilip  路  6Comments

sgomes picture sgomes  路  5Comments

yuheiy picture yuheiy  路  4Comments

KeviinCosmos picture KeviinCosmos  路  3Comments

jasonkuhrt picture jasonkuhrt  路  6Comments