Dajbych.net


Vendor prefixes in CSS are losing their meaning, IE is starting to ignore them

, 2 minutes to read

html5 css3 logo

The browser manufacturer’s prefixes in cascading style sheets (-ms-, -moz-, -webkit-, -khtml-, -o-) lose their meaning. Internet Explorer 11 stops noticing them and instead starts to support some features designed for experimental introduction of new techniques into WebKit. Web developers deliberately prefer only one browser, most often with the WebKit engine, and thus create the false impression that other browsers cannot do the same. However, the opposite is often true.

Because this creates a big problem especially for Windows Phone, Microsoft has no choice but to pretend to be a different browser. Internet Explorer 11 for PC changed its User-Agent chain and the same fate befell the version for Windows Phone 8.1. But it goes one step further. Techniques that are available with the -webkit- prefix and that IE11 also supports will be treated as if they were listed with the -ms- prefix. It is likely that this change will be reflected in the desktop version over time.

Three years ago, Henri Sivonen, a developer at Mozilla, meticulously explained why vendor prefixes in CSS are a bad idea. Eric Law, a former Microsoft developer, recently aptly summed up that there is a good reason for faking versions other than the real ones, because they are trying to adapt to someone else’s bad code.

When you use the manufacturer’s prefix, you simply have to take into account that it only works somewhere and that the specification (and subsequently the implementation) may change in the future. Every time a new version of the browser comes out, you'll need to check if your site still looks and works the same. Since new versions of browsers are released every few weeks, it is necessary to keep the prefix in mind every time.

However, browser prefixes were supposed to improve compatibility. The prefix means a likely change in the future. On the contrary, its absence indicates permanence, greater than in the past, thanks to prefixes. But it seems that the indiscipline of the developers can blow this idea away. The developer’s ability to use two different experimental implementations is conditional on strict adherence to the prefixes by the browser. On the other hand, strict adherence to prefixes by the browser is conditional on refraining from prefixes outside of web technical demonstrations.