Sample CSS:
background-image: -moz-linear-gradient(90deg, #e8f0ff, #ffffff);
background-image: -ms-linear-gradient(90deg, #e8f0ff, #ffffff);
background-image: -o-linear-gradient(90deg, #e8f0ff, #ffffff);
background-image: -webkit-linear-gradient(90deg, #e8f0ff, #ffffff);
background-image: linear-gradient(90deg, #e8f0ff, #ffffff);
This used to result in a linear gradient going from #e8f0ff at the bottom, to #fff at the top.
Post-Firefox 16 (released a few days ago), the gradient now goes from #e8f0ff at the left, to #fff at the right.
When I remove the vendor-specific CSS and leave just:
background-image: linear-gradient(90deg, #e8f0ff, #ffffff);
Nothing happens. But when I delete that line and leave just the vendor-specific styles:
background-image: -moz-linear-gradient(90deg, #e8f0ff, #ffffff);
background-image: -ms-linear-gradient(90deg, #e8f0ff, #ffffff);
background-image: -o-linear-gradient(90deg, #e8f0ff, #ffffff);
background-image: -webkit-linear-gradient(90deg, #e8f0ff, #ffffff);
It corrects the problem.
So what’s happening here that’s new in FF16? Are the Xdeg values starting from a new direction, are they being added together only in certain situations? I can’t figure out why it would do 180deg with both or with only general, but only 90deg if it’s only vendor.
The question is, what are the specifics of this new behavior from Firefox, and what’s the broadest, most standards-compliant solution for websites that now have their gradients going the wrong way in FF16?
The standard dictates that angles are measured clockwise starting from 0° = upward.
-moz-linear-gradient, on the other hand, uses polar coordinates (emphasis mine):