Open ddssff opened 2 years ago
I think linearGradient
and repeatingLinearGradient
are the only functions using this Direction
. Which means:
repeatingLinearGradient
has the same bug like linearGradient
Val
instance to your fix instead, essentially fixing both functionsLooking into https://www.w3schools.com/csSref/func_repeating-linear-gradient.asp, I'm actually getting the impression that Direction
is not defined in a sensible way to begin with. A better definition would be something like:
data Direction = DirectionSide Side | DirectionCorner Side side | DirectionAngle (Angle Deg)
instance Val Direction where
value (DirectionSide side) = "to " <> value side
...
(An even better definition would allow any kind of angle, not just degrees.)
But I can understand if redefining Direction
like that is too much for a quick fix PR.
Maybe we could write new tickets for further improvements.
True, then the best path forward is changing the Val
instance, I think.
Can you add a unit test for this?
uh oh I don't even remember what a linear gradient is :upside_down_face:
…es out
"linear-gradient(bottom, ..." rather than "linear-graident(to bottom, ...". With this we get "linear-gradient(180deg, ...".