sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
357 stars 72 forks source link

Gradients malformed syntax #168

Closed RamiroPastor closed 4 years ago

RamiroPastor commented 6 years ago

The code:

  backgroundImage
    $ radialGradient
        sideCenter
        (circle closestSide)
        [(red , pct 100)]

The error:

background: -webkit-radial-gradient(center,circle closest-side,#ff0000 100%);
background: -moz-radial-gradient(center,circle closest-side,#ff0000 100%);
background: -ms-radial-gradient(center,circle closest-side,#ff0000 100%);
background: -o-radial-gradient(center,circle closest-side,#ff0000 100%);
background: radial-gradient(center,circle closest-side,#ff0000 100%);
dbaynard commented 6 years ago

What should it be? There are a few issues with background* — I'd quite like to make some fairly big breaking changes to it (that probably won't affect working code, but should stop things like this) for a (near) future major release.

RamiroPastor commented 6 years ago

According to this it should be

background: radial-gradient(shape size at position, start-color, ..., last-color);

so

background: radial-gradient(circle closest-side at center,#ff0000 100%);

Btw i don't have much experience with open source contributing but i could mark some of the open issues if i think they could be closed for example

RamiroPastor commented 6 years ago

Also, this works (and the default position is center):

"background" -: "radial-gradient(circle closest-corner, springgreen 35%, #003270 85%);"
turion commented 4 years ago

@RamiroPastor Do you want to give this issue a try in a pull request?

github-actions[bot] commented 4 years ago

Stale issue message