rafaelcaricio / gradient-parser

Parse CSS3 gradient definitions and build an AST object.
MIT License
62 stars 10 forks source link

Fails on radial gradient when position is provided without shape and extent #10

Open HotpotDesign opened 5 years ago

HotpotDesign commented 5 years ago

Properly parsing CSS gradients is such a thorny problem. This is an awesome parser. Thanks so much for writing it!

Here's one gradient where the parser chokes:

radial-gradient(at 57% 50%, rgb(102, 126, 234) 0%, rgb(118, 75, 162) 100%)

In Chrome, the default values for shape and extent are sometimes omitted.