W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

Re: [csswg-drafts] [css-transforms] Ambiguous syntax for translate, scale, rotate and matrix in SVG (#4455)

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Wed, 30 Oct 2019 02:56:56 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-547717509-1572404215-sysbot+gh@w3.org>
Making the separator optional was an intentional change based on browser behavior, see https://github.com/w3c/csswg-drafts/issues/2623 (Unfortunately, it looks like no one thought to test Inkscape at the time!)

(For reference: [The original syntax in SVG 11](https://www.w3.org/TR/SVG11/coords.html#TransformAttribute) required the separator. )

Part of that discussion covers the similarity with CSS and also SVG path parsing when it comes to optional separators if tokenization is unambiguous. (@mclegrand, you might want to check those sections of the Inkscape codebase to see how the other parsers handle the tokenization!) It should match how those other parsers handle the unseparated tokens: e.g.,  `5-5` same as `5 -5`, and `0.1.2` same as `0.1 0.2`.

I definitely don't want to start talking about using non-greedy parsing to try to avoid parsing errors. The `matrix()` function requires six parameters, should the parser split up a single six-digit number to make it pass???  If you have any suggestions on wording to clarify that part, Tab, please contribute them.  But otherwise I think we can close this issue.



-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4455#issuecomment-547717509 using your GitHub account
Received on Wednesday, 30 October 2019 02:56:57 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:55 UTC