-moz-prefixed gradient support to be removed, make sure you have unprefixed gradients

Published: | Categories: CSS | Creative Commons BY-SA 3.0

Description

The -moz-linear-gradient, -moz-repeating-linear-gradient, -moz-radial-gradient and -moz-repeating-radial-gradient functions are to be gone in favour of the standard, unprefixed version of CSS gradients available since Firefox 16. Mozilla developers once removed the prefix support from the Firefox 42 Nightly builds, however, the change was backed out in a week due to a lot of broken sites where only legacy prefixed gradients are used in their stylesheets.

In order to help Web developers test sites with prefixed gradients disabled, a hidden preference has been added to Firefox 42. Here’s how: open the preference editor by typing about:config in the Address Bar, search layout.css.prefixes.gradients, double-click on the preference item to flip the value, then load your site to make sure every part is displayed properly. If something is broken, unprefixed gradients, linear-gradient(), repeating-linear-gradient(), radial-gradient() or repeating-radial-gradient(), are missing in your stylesheet.

Given the considerable number of broken sites, it may be difficult for Firefox to remove the legacy prefix support sometime soon, but developers should always be using unprefixed gradients to make your site future-proof. The same applies to any other CSS properties, values and functions, of course.

Update: Firefox 49 has added the interoperability support for the yet popular -webkit-prefixed gradient functions, therefore, Mozilla developers are considering to drop the -moz support sometime soon. Given that many sites are using -webkit gradients, the risk of the change should be low.

References