Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Autoprefixer doesn't add prefix for font-smoothing

Autoprefixer webpack loader adding autoprefix for all css however it doesn't add autoprefix for font-smoothing : antialiased.

why it's not adding autoprefix for this?

like image 553
Jagajit Prusty Avatar asked Feb 02 '17 07:02

Jagajit Prusty


People also ask

Are vendor prefixes still needed 2021?

Yes, and there will always be, as it's kind of an industry standard that vendors use their prefix on newly drafted properties/methods until those become a standard.

Does vendor need prefix?

A vendor prefix isn't a hack because it allows the specification to set up rules for how a property might be implemented, while at the same time allowing browser makers to implement a property in a different way without breaking everything else.

What is webkit prefix?

The major browsers use the following prefixes: -webkit- (Chrome, Safari, newer versions of Opera, almost all iOS browsers including Firefox for iOS; basically, any WebKit based browser) -moz- (Firefox)

Is webkit still necessary?

For the latest versions of Firefox, Chrome and Safari that is true. However, for people using earlier versions of the browsers (Firefox 3.6, as an example) you would still need to leave the -moz and -webkit prefixes. If you want to target them, you shouldn't remove them.


1 Answers

I guess because it is an vendor (-webkit-) specific attribute. So there are no other prefixes with this attribute. You can see a little discussion on twitter as well: https://twitter.com/autoprefixer/status/444429500789841921?lang=nl

Found another website who explain the usage more: https://davidwalsh.name/font-smoothing

TL;DR:

For other vendors you even need another setting (antialiased and grayscale)

.element {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
like image 144
Remco Abalain Avatar answered Oct 19 '22 01:10

Remco Abalain