Re: [svgwg] Do we really need not to reflect additional enum values in SVG 2

The Working Group just discussed `Enum values`, and agreed to the following:

* `RESOLVED: Do not extend the SVG_LENGTHTYPE_* and SVG_ANGLETYPE_* constants & enumeration for new CSS units.`
* `RESOLVED: If a length/angle was declared using a unit not in the enum, it should be exposed as type UNKNOWN.`

<details><summary>The full IRC log of that discussion</summary>
&lt;AmeliaBR> Topic: Enum values<br>
&lt;AmeliaBR> Github: https://github.com/w3c/svgwg/issues/424<br>
&lt;AmeliaBR> Dirk: We agreed to add new enums for things like marker orientation and blend modes, where we have new attribute values.<br>
&lt;AmeliaBR> ... But then a question was raised about things like SVGLength unit types, do we want to support the new CSS units.<br>
&lt;AmeliaBR> ... David commented that Edge does not have these, and I know that WebKit doesn't. I added a few hacks to work around that.<br>
&lt;AmeliaBR> ... So do we want to add things? CSS could add more units, hard to keep up.<br>
&lt;AmeliaBR> Amelia: I think we should make sure there is clear behavior for units that don't have a reflected value.<br>
&lt;AmeliaBR> Dirk: Agree, but the first question is should we try to extend the list.<br>
&lt;AmeliaBR> Amelia: I don't think so. Too difficult to keep up with new units, and CSS Typed OM should eventually replace it anyway.<br>
&lt;AmeliaBR> Proposed RESOLVED: Do not extend the SVG_LENGTHTYPE_* and SVG_ANGLETYPE_* constants &amp; enumeration for new CSS units.<br>
&lt;AmeliaBR> RESOLVED: Do not extend the SVG_LENGTHTYPE_* and SVG_ANGLETYPE_* constants &amp; enumeration for new CSS units.<br>
&lt;AmeliaBR> Dirk: Can we add a link to CSS Typed OM in the spec?<br>
&lt;plh> --> https://www.w3.org/standards/history/css-typed-om-1 CSS Typed OM<br>
&lt;AmeliaBR> Amelia: A note is easy. Won't automatically apply for all SVG attributes, but will apply for those that have been upgraded to CSS properties.<br>
&lt;AmeliaBR> Dirk: Other attributes won't use CSS properties, anyway.<br>
&lt;AmeliaBR> Amelia: Not necessarily. We sometimes use CSS syntax for attribute values that aren't CSS properties.<br>
&lt;AmeliaBR> Dirk: Probably need to reconsider that. Not sure if browsers use them.<br>
&lt;AmeliaBR> Amelia: Yes, last I checked browsers are very wonky about new units (and calc) in SVG attributes, including ones that *do* map to CSS properties.<br>
&lt;AmeliaBR> Dirk: I'd prefer to have a clearer distinction between presentation attributes &amp; parsing vs others.<br>
&lt;AmeliaBR> Amelia: Either way, we still need guidelines on what to do with the legacy DOM interfaces when new units are used.<br>
&lt;AmeliaBR> Dirk: Looking at the enum value, there is an "UNKNOWN" value, so that makes sense to use.<br>
&lt;AmeliaBR> Amelia: Yes, but not sure how that affects the rest of the interface &amp; math methods. Can we still convert it to the px value or other units?<br>
&lt;AmeliaBR> Dirk: Need to check the existing spec &amp; implementations. Probably make it able to convert to the simple number value, but not the rest.<br>
&lt;AmeliaBR> Tav: If it's a lot of work to *not* update the list, would it be easier to just update it?<br>
&lt;AmeliaBR> Dirk: Either way, with new units being proposed, we'd still need to define what happens.<br>
&lt;AmeliaBR> Amelia: I do agree that the focus should be to keep it as simple as possible. Unknown unit, but still make the simple user-unit value still returns a valid number.<br>
&lt;AmeliaBR> ... Either way, should be a separate issue to discuss the details.<br>
&lt;AmeliaBR> Proposed: If a length/angle was declared using a unit not in the enum, it should be exposed as type UNKNOWN.<br>
&lt;AmeliaBR> RESOLVED: If a length/angle was declared using a unit not in the enum, it should be exposed as type UNKNOWN.<br>
&lt;plh> Next meeting is August 13<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/424#issuecomment-408998878 using your GitHub account

Received on Monday, 30 July 2018 20:27:53 UTC