user1117313
user1117313

Reputation: 1985

CSS3: Do we still need to use browser prefixes?

Do we still need to use the browser prefixes for css3 properties, for example -moz-box-shadow, -moz-transition: all 0.3s ease-out; etc?

Upvotes: 1

Views: 408

Answers (6)

james6848
james6848

Reputation: 1667

One important thing is to make sure you use the 'proper' CSS3 rule after the other rules, in this way the browser will use this rule if and when it becomes available. e.g.:

webkit-border-radius: 6px; 
-moz-border-radius:6px;
border-radius:6px;

Upvotes: 1

Andreas Eriksson
Andreas Eriksson

Reputation: 9027

An important thing to take into consideration is that if you are using Vendor Prefixes, then you are clearly using an experimental feature - not only will this property not work in older versions of the browsers you're targeting, and should thus not be used for anything essential, but they are also subject to change. You really shouldn't use experimental features in a production environment.

To answer your question, if you want to target a browser that only supports a vendor-prefixed version of the CSS property, then yes, you do need to do that. However, if you include a non-vendor-prefixed version of it as well, then all browsers will support that declaration eventually.

Upvotes: 2

sascha
sascha

Reputation: 4690

Found the entry on someone's blog here on SO and I think it's useful. You can use Javascript to make it compatible for all browsers without writing CSS properties for every single browser

Upvotes: 2

Erik Funkenbusch
Erik Funkenbusch

Reputation: 93424

If you only want to support the latest browsers, then no. Many companies are still using older versions of Firefox or IE, however. So by dropping the extensions you won't have those features, even if the browser supports them.

Upvotes: 1

Raptor
Raptor

Reputation: 54212

Yes (at this moment). Since modern browsers do not support the same set of CSS3 effects yet, prefixes are still needed.

Upvotes: 1

auo
auo

Reputation: 572

For now, yes. Some properties are not supported by all browsers or in different ways since not all properties are set in the standard.

Css3 info

Upvotes: 1

Related Questions