w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.45k stars 657 forks source link

[css-shapes-2] Some arc and curve command parameters should not be optional #10697

Open cdoublev opened 1 month ago

cdoublev commented 1 month ago

Following this resolution and the accepted PR, the syntax of <arc-command> is arc [[<by-to> <coordinate-pair>] || [of <length-percentage>{1,2}] || <arc-sweep>? || <arc-size>? || [rotate <angle>]?].

<by-to> <coordinate-pair> and of <length-percentage>{1,2} are now optional but this does not seem to be the intent of the resolution: "switch to using, allow reordering grammar".

The same problem applies to:

If this is not intentional, I suggest:

<arc-command> = arc [
     <by-to> <coordinate-pair>
  && of <length-percentage>{1,2}
  && <arc-sweep>?
  && <arc-size>?
  && [rotate <angle>]?
]
<curve-command> = curve [<by-to> <coordinate-pair> && using <coordinate-pair>{1,2}]
<smooth-command> = smooth [<by-to> <coordinate-pair> && [using <coordinate-pair>]?]
noamr commented 2 days ago

Seems right, I can prepare a PR (I don't think we need a new resolution)