[csswg-drafts] [css-shapes] Functional notation for Polygon: commas or no commas?

faceless2 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-shapes] Functional notation for Polygon: commas or no commas? ==
The definition of the polygon() function in the current draft is:
```
polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )
```
but all of the `web-platform-test/css/css-masking/clip-path/clip-path-polygon-*.html` files use commas to separate the `<length-percentage>` pairs, and this comma is required by Chrome and Firefox.

I've read all of https://lists.w3.org/Archives/Public/www-style/2013Oct/0016.html and I _think_ the conclusion was the commas are required for polygons, but optional for other shapes. However this discussion predates #266.

* If commas are required I believe the correct syntax is:
```
polygon( <fill-rule>? , [<length-percentage> <length-percentage> ,]# )
```

* If the spec is correct and commas are disallowed, then all those test cases are wrong and need updating, as do the two main browsers. Unlikely.

* If commas between the pairs are optional, a note should be made to that effect in the spec. Given the syntax without commas has been public for some time now, there is precedent for allowing both syntaxes given that no ambiguity arises. See specifically the definition of "rect" in css-masking: _"User agents must support separation with commas, but may also support separation without commas (but not a combination), because a previous revision of this specification was ambiguous in this respect."_


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3273 using your GitHub account

Received on Thursday, 1 November 2018 13:54:56 UTC