rafaelcaricio / gradient-parser

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

fails on using gradient with rgb colors #6

Open vineet-amuratech opened 8 years ago

vineet-amuratech commented 8 years ago

orientation - right color-stops - 2

GradientParser.parse('-webkit-linear-gradient(right , rgb(248, 6, 234) 71% , rgb(202, 74, 208) 78%)')

gives orientation - null color-stops - 3

[{"type":"linear-gradient","colorStops":[{"type":"literal","value":"right"},{"type":"rgb","value":["248","6","234"],"length":{"type":"%","value":"71"}},{"type":"rgb","value":["202","74","208"],"length":{"type":"%","value":"78"}}]}]