{"id":339518,"date":"2021-05-05T07:18:28","date_gmt":"2021-05-05T14:18:28","guid":{"rendered":"https:\/\/css-tricks.com\/?p=339518"},"modified":"2021-05-05T07:18:31","modified_gmt":"2021-05-05T14:18:31","slug":"is-vendor-prefixing-dead","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/is-vendor-prefixing-dead\/","title":{"rendered":"Is Vendor Prefixing Dead?"},"content":{"rendered":"\n
Let\u2018s take a quick stroll down memory-lane to revisit how vendor prefixing<\/a> CSS properties came to be. I hope I don\u2019t trigger PTSD for anyone!<\/p>\n\n\n\n It\u2018s not clear who started prefixing, or when it began exactly. What is clear, is that by 2006, prefixed features were in Internet Explorer and Firefox. The raison d\u2019\u00eatre<\/em> of prefixes was to specify browser-specific features. It was seen as a way to implement non-standard features and offer previews of new standard features.<\/p>\n\n\n\n\n\n\n\n By 2012, the W3C CSS Working Group was issuing guidance on the use of vendor prefixes<\/a>:<\/p>\n\n\n\n In CSS we use vendor prefixes for properties, values, @-rules that are: – vendor specific extensions (per CSS 2.1), or – experimental implementations (per CSS Snapshot 2010) (e.g. in Working Drafts)<\/p><\/blockquote>\n\n\n\n It became an industry norm. The number of prefixes grew, and with it, things grew confusing. It led to partial implementations of CSS features, introduced bugs, and ultimately created a fracture in the browser ecosystem, which disgruntled developers. Developers responded by making tools<\/a> to automate the problem away.<\/p>\n\n\n\n Browser vendors slowly began to move away from prefixing, favoring feature flags inside the browser settings instead. It appeared that the problems created by vendor prefixes would fade away in time. The question is: has that time come yet?<\/strong><\/p>\n\n\n\n I did some analysis on the caniuse dataset<\/a> and Mozilla Developer Network Compat dataset<\/a> to answer this question.<\/p>\n\n\n You can see the trend of the implementation of prefixed features across the major browsers in the chart above. I have excluded Chrome for Android because of insufficient data.<\/p>\n\n\n\n From 2007 until 2011, there was a steady increase in the numbers of prefixed features in all browsers. Internet Explorer only saw an uptick in 2011. Then, in 2012, Mozilla began to remove prefixed features\u2009\u2014\u2009such as In 2013, Mozilla started to make features available behind feature flags (pref flags)<\/a>. That same year, Chrome switched its rendering engine from WebKit to Blink (part of the Chromium project). This was a big turning point in removing some prefixed features.<\/p>\n\n\n\n It was only in April 2016 that WebKit announced that it would no longer release experimental features with prefixes<\/a>:<\/p>\n\n\n\n Over time this strategy has turned out not to work so well. Many websites came to depend on prefixed properties. They often used every prefixed variant of a feature, which makes CSS less maintainable and JavaScript programs trickier to write. Sites frequently used just the prefixed version of a feature, which made it hard for browsers to drop support for the prefixed variant when adding support for the unprefixed, standard version. Ultimately, browsers felt pressured by compatibility concerns to implement each other\u2019s prefixes.<\/p><\/blockquote>\n\n\n\n Because Safari and iOS browsers have always used the WebKit rendering engine, a consistent reduction in the number of prefixes came later to these browsers. <\/p>\n\n\n\n Microsoft was never \u201cgung ho\u201d on prefixing and consistently had the fewest prefixed features. In 2019, Edge switched from its own rendering engine to Blink. In a funny twist, the change actually increased the number of prefixed properties in Edge!<\/p>\n\n\n The table below contrasts the prefixed features in 2013 (the zenith of prefixing) with 2021.<\/p>\n\n\n\nAdoption trends<\/h3>\n\n\n
-moz-border-radius*<\/code> and
-moz-box-shadow<\/code>\u2009\u2014\u2009from Firefox. Thereafter, they consistently removed prefixed properties once the standard version of that property was fully implemented. <\/p>\n\n\n\n
Feature trends<\/h3>\n\n\n