Why CSS properties do have different names for Chrome, FF, Opera? Why CSS properties do have different names for Chrome, FF, Opera? google-chrome google-chrome

Why CSS properties do have different names for Chrome, FF, Opera?


This happens because browsers do not want conflicts with each other. In addition to that, there isn't really a "spec" for box-shadow at the moment, so several browsers have their own implementation of it.

This approach allows any vendor-specific extension to coexist with any future (or current) CSS properties without causing conflicts because, according to the W3C specifications, a CSS property name will never begin with a dash or an underscore:

Source: http://reference.sitepoint.com/css/vendorspecific


It's a way for browsers to release features before the CSS Spec is fully approved.

For instance, look at the CSS3 gradients. -moz- vs -webkit- are completely different.

background-image: -webkit-gradient(    linear,    left bottom,    left top,    color-stop(0.15, rgb(145,4,88)),    color-stop(0.58, rgb(174,30,115)),    color-stop(0.79, rgb(209,57,150)));background-image: -moz-linear-gradient(    center bottom,    rgb(145,4,88) 15%,    rgb(174,30,115) 58%,    rgb(209,57,150) 79%);

This may be of interest: http://www.alistapart.com/articles/prefix-or-posthack/

So the next time you find yourself grumbling about declaring the same thing four times, once for each browser, remember that the pain is temporary. It’s a little like a vaccine—the shot hurts now, true, but it’s really not that bad in comparison to the disease it prevents. And in this case, you’re being vaccinated against a bad case of multi-year parser hacking and browser sniffing. We suffered through that long plague once already. Prefixes will, if used properly, ward off another outbreak for a long time to come.

NOTE: It's good practice to include the version without the prefixes, as to continue the sites function when the property is fully adopted.


Properties which are implemented based on unfinishes specs are given vendor prefix. Same thing if given vendor thinks their implementation is not finished, even though the spec is.