You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After my most recent paper.js upgrade, a lot of the colors in my project have turned to Black. I discovered that this is because my color string constants are in the format rgba( red, green, blue, alpha ) instead of rgba(red, green, blue, alpha) (notice the space after the opening and before the closing parentheses). In the previous version, this worked fine, but now it is parsing to pure black. The CSS standard supports spaces in the parentheses like this, so paper should ideally support them as well.
After that commit, the parser splits on [,\s]+ instead of just , but does not filter out empty components. The first space now acts as a split character and the first component is an empty string.
Description/Steps to reproduce
After my most recent paper.js upgrade, a lot of the colors in my project have turned to Black. I discovered that this is because my color string constants are in the format
rgba( red, green, blue, alpha )
instead ofrgba(red, green, blue, alpha)
(notice the space after the opening and before the closing parentheses). In the previous version, this worked fine, but now it is parsing to pure black. The CSS standard supports spaces in the parentheses like this, so paper should ideally support them as well.Link to reproduction test-case
Reproduction in paper sketch
All versions prior to 0.11.8 work fine, whereas 0.11.8 parses the second shape as black.
Expected result
Both squares in the example should have the same color, but in the latest version, the latter shape is black.
The text was updated successfully, but these errors were encountered: