Do you use CSS prefixes such as -ms-, -webkit-, -moz-, etc?


#1

Hi guys. Do you use CSS prefixes such as -ms-, -webkit-, -moz-, etc? All modern browsers already works without these prefixes. Do we really need care about people who use obsolete browsers?


#2
All modern browsers already works without these prefixes

Partially wrong. Most of webkit properties still need the prefix, while transforms need the -ms prefix for IE9, etc…

Prefixes should be used if they are used by browsers, and currently, there are many prefixes still in use. Obviously you won’t use a prefix for border-radius or something which is already supported, but to not use a prefix for a browser which needs it, would mean to not support that browser actually.

I suggest to check with caniuse.com and see if you need to use it or not.


#3

Currently prefixes you should use for compatibility are

-ms-
-webkit-

Firefox in almost any case is ok with “prefix free”. Anyway as already suggested, always check them to br sure.


Personally I code everything to be compatible with IE8 since there are still a lot of customers checking it. Obviously don't try to simulate complex effects on it, but just check that everything is displayed properly

#4

Thanks for explanations, guys. :slight_smile:


#5

Short answer, YES.

Arg: I use Less and with it I use LessHat, that let’s me write clear code without to worry about prefixes. https://github.com/madebysource/lesshat