Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-moz and -webkit css no longer needed?

I have been using the -moz and -webkit css styles for a while now for things like box shadow, text shadow, etc. And lately I have noticed that each FireFox, Chrome, Safari, and IE (9) all yield the same results with the standard box-shadow and text-shadow and similar css styles.

I was wondering if this is documented anywhere. Because I successfully removed all of the browser-specific ones from a site and it still looks the same in all four of those browsers.

like image 881
Ciel Avatar asked Sep 22 '11 09:09

Ciel


4 Answers

The latest browsers support these css3 properties by default. These -moz and -webkit specials should however still be used for backwards compatibility with older browsers. Older browsers implemented these to allow the use of these properties before they became standard.

like image 126
JNDPNT Avatar answered Nov 10 '22 14:11

JNDPNT


I suppose it depends on the version of the browsers you are targeting.

It sounds like if, and only if, your app or site is intended to only work on the very latest versions of all the browsers, you can afford to omit the -moz and -webkit on the specific properties you have tested.

There are other properties that aren't supported on all browsers, e.g. my personal favourite webkit-transition. Of course in actual reality it's unlikely you can get away with targetting only the latest browsers unless you're making a personal project.

like image 28
Ben Clayton Avatar answered Nov 10 '22 16:11

Ben Clayton


If you don't want to write that much and still want backwards compatibility: less.css could be your friend.

Another thing: w3schools.com has an up-to-date database for all CSS commands and which browser supports it. Helped a lot.

like image 35
sascha Avatar answered Nov 10 '22 16:11

sascha


It might be useful to keep them for older browsers that don't have the standards, but do have the -moz and -webkit css styles.

like image 1
Snicksie Avatar answered Nov 10 '22 15:11

Snicksie