CSS radial gradients no longer accept negative radii


Categories: CSS

Releases: Firefox 71, Firefox 78 ESR


Starting with Firefox 71, both the prefixed and unprefixed radial-gradient() CSS functions will ignore parameters with any negative length, which has been invalid in the spec but supported in all browsers. The following declarations, for example, won’t work any more:

background-image: radial-gradient(-100px 25px, red, green);
background-image: -moz-radial-gradient(50%, -100px -10%, red, blue);
background-image: -webkit-gradient(radial, 1 2, -1.5, 50% 50%, 10000);

Google Chrome has made the same change in the recent version, and Safari may also follow.