Closed passcod closed 9 years ago
I'll do it in #94, thanks.
However, the line
If the argument is ‘to top’, ‘to right’, ‘to bottom’, or ‘to left’, the angle of the gradient line is ‘0deg’, ‘90deg’, ‘180deg’, or ‘270deg’, respectively.
is wrong, read this article by Eric Meyer.
That's straight from the spec. So you mean the spec is wrong ...?
I think you'll find that the bottom paragraph addresses the semantics expressed in Meyer's article, which concerns the corners, i.e. to top left
, to top right
, to bottom right
, and to bottom left
. For the cardinal directions to top
, to right
, to bottom
, to left
, the angle is constant and indeed as spec'd, according to the new angle model for the new syntax.
Ah, misread it, you're right, nevermind, I'm stupid at the mornings sometimes :)
I would convert top
to to bottom
for the prefix-free property and to top
to bottom
for all the prefixed ones, also would do the degree calculating for prefixed variants.
Yep, that sounds right. As a side note, the current version works for FF16+ as there's no support for degrees, which means the non-to
syntax triggers the -prefixed-, old, behaviour :smile:
The absence of degrees support in current nib is actually cool 'cause there won't be compatibility problems — we could make the new gradients use the new syntax and just convert it to older for prefixed props without fear of breaking something for someone :)
Fixed in #94.
Firefox 16+ (and soon other, newer browsers that aren't really out yet, like IE10 or Chrome 20-something) implements the definitive gradient spec which changes the way the direction argument is defined and handled:
The
<color-stop>
syntax is unchanged.