Should we use -webkit- and -moz- for recognized CSS3 properties?

I'm trying to clear a CSS file and I wonder if it’s safe to remove vendor-specific properties now, are they standardized (or at least semi-standardized)?

For example, I should use

-webkit-border-radius -moz-border-radius border-radius 

Or is it better to just go with

 border-radius 

?

+4
source share
3 answers

Yes, I would say stick to them. If you are not sure about the standard of the X-browser. According to w3schools, all major browsers support border-radius , however this is not a trustworthy site for such information.

Why not check it out?

+1
source

It depends on the property, but basically the answer is that you should continue to use versions with a browser prefix. It depends on the implementation status and the actual use of different versions of browsers, and not on the standardization status as such.

Check the MDN property descriptions , section Browser Compatibility. Although they are not authoritative and not entirely relevant in all cases, they are an excellent reference. For example, border-radius description says that Firefox 4.0 and later, Chrome 4.0 and Safari 5.0 support a standard, non-prefix version. Older versions have very low usage.

Existing code, on the other hand, should not be flushed. You won’t win anything, but you risk making stupid mistakes when editing code. Although, for example, in the current version, Firefox ignores the name of the prefixed property, this does not interfere with the pages using it, provided that they also set the property using the standard name.

In contrast, for example, the very useful hyphens feature currently has no support other than a browser prefix. To take another example, border-image is basically only supported as a browser prefix, although Firefox 15 and later and Opera also support the standard name.

There are reasons why older browsers can still be used. One reason is that some applications that are important in some environments may not work in newer versions of the browser. (Or is this what I was told when I came across some very old versions to use.)

+1
source

Use the former to support backward compatibility.

 -webkit-border-radius -moz-border-radius border-radius 
0
source

Source: https://habr.com/ru/post/1437004/


All Articles