[css-transforms] Ambiguous syntax for translate, scale, rotate and matrix in SVG

Open
#4,455 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
css
Domain
frontend, web-dev

Research direction

Begin with the CSS Transforms syntax definitions for translate, scale, rotate, and matrix in the repository's Bikeshed sources; no source file or test is named in the issue. Compare the current comma-wsp? grammar with the parsing ambiguity described, and confirm completion by resolving separator handling consistently for all four functions.

Written by the indexing model from the issue text.

Description

css-transforms-1 SVG

translate and scale have number ( comma-wsp? number )? which allows for number number 💥 without separators, which confusers parsers and seems like a bug, which should be number ( comma-wsp number )?. Same for rotate : ( comma-wsp? number comma-wsp? number )? should be ( comma-wsp number comma-wsp number )?

(The ambiguity is : transform(12) should not be parsed as transform(1 2) just because "1" and "2" are numbers and hence the parsing can be done that way. )

edit : same for matrix which has comma-wsp**?** between all attributes

Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.