W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2018

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

From: Mike Bremford via GitHub <sysbot+gh@w3.org>
Date: Thu, 01 Nov 2018 13:54:45 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-376402147-1541080472-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:59 UTC