Autoprefixer: Check -webkit-background-clip again

Created on 30 Apr 2017  路  11Comments  路  Source: postcss/autoprefixer

Most helpful comment

Some comments:

  • right now, all browsers that support background-clip: text (aka, Firefox and Edge) also support -webkit-background-clip: text
  • other browsers (Blink and WebKit) only support the -webkit- version
  • there are no other prefixes that I know of that include the text value
  • it is usually used in combination with -webkit-text-fill-color in order to coordinate styles to only apply in browsers that support. There is not yet support for an unprefixed version of this property, although a standard fill-color is proposed.

But prefixes are ugly, and a dev working on Firefox or Edge as their main browser currently needs to remember to add in the prefixes for Chrome & Safari etc.


Possibly relevant usage stats from Microsoft's analytics:

  • -webkit-background-clip: text is served to Chrome by approximately 0.03% of pages (763/2,354,088)
  • background-clip: text is computed by Firefox / Edge (meaning they get served it either prefixed or un-prefixed: they treat the prefix as a shorthand for the unprefixed, and the MS data doesn't record shorthands, only computed values) on approximately 0.02% of pages (429 or 488 /2,354,088)

Which tells me that the number of sites using browser sniffing or CSS selector hacks to avoid sending -webkit- properties to Firefox and Edge is greater than the number of sites using background-clip: text without prefixes.

All 11 comments

Some comments:

  • right now, all browsers that support background-clip: text (aka, Firefox and Edge) also support -webkit-background-clip: text
  • other browsers (Blink and WebKit) only support the -webkit- version
  • there are no other prefixes that I know of that include the text value
  • it is usually used in combination with -webkit-text-fill-color in order to coordinate styles to only apply in browsers that support. There is not yet support for an unprefixed version of this property, although a standard fill-color is proposed.

But prefixes are ugly, and a dev working on Firefox or Edge as their main browser currently needs to remember to add in the prefixes for Chrome & Safari etc.


Possibly relevant usage stats from Microsoft's analytics:

  • -webkit-background-clip: text is served to Chrome by approximately 0.03% of pages (763/2,354,088)
  • background-clip: text is computed by Firefox / Edge (meaning they get served it either prefixed or un-prefixed: they treat the prefix as a shorthand for the unprefixed, and the MS data doesn't record shorthands, only computed values) on approximately 0.02% of pages (429 or 488 /2,354,088)

Which tells me that the number of sites using browser sniffing or CSS selector hacks to avoid sending -webkit- properties to Firefox and Edge is greater than the number of sites using background-clip: text without prefixes.

Main problems right now:

  1. We don鈥檛 have prefix data on Can I Use.
  2. We still need prefix for -webkit-text-fill-color.

Right now I am thinking that we should keep -webkit- prefix. If somebody really wants to remove this prefix, add data to Can I Use ;).

Closing since nobody added data to Can I Use

@ai
Is this closed because it was fixed?
caniuse says to use the prefix: https://caniuse.com/#search=background-clip

I am not getting it, and have to manually add it :o

@sombreroEnPuntas it was closed because no one decided to add prefix data to Can I Use. So seems like it is not necessary.

Right now Can I Use show prefix only in comments. But we need to show it in versions blocks. If you want t have this feature in Autoprefixer, maybe you can create a separated css-blackground-clip data for Can I Use.

I see. I actually tried to understand the format on their repo, but don't get it :s
Not sure how to move the prefix from the comments to version blocks

@sombreroEnPuntas

  1. You need to create new file in features-json/
  2. Here is fields description https://github.com/Fyrd/caniuse/blob/master/CONTRIBUTING.md

Done 73c7b6a

Released in 9.1

Awesome!

Out of curiosity... can you point me to the commit on caniuse that added the prefixing options?

It is closed because it was fixed in the master. I will release the fix in next caniuse-db release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kossnocorp picture kossnocorp  路  24Comments

bardware picture bardware  路  24Comments

denniscohn picture denniscohn  路  22Comments

evandiamond picture evandiamond  路  25Comments

Dan503 picture Dan503  路  34Comments