Re: [svgwg] What is the unit type after setting an SVGAngle or SVGLength's value (#478)

The SVG Working Group just discussed `Unit type after setting SVGAngle or SVGLength via SVG DOM`, and agreed to the following:

* `RESOLUTION: Amelia writes proposal as PR and gathers feedback from implementers. Idea is to follow Chromium with some fixes described in the issue`

<details><summary>The full IRC log of that discussion</summary>
&lt;krit> topic: Unit type after setting SVGAngle or SVGLength via SVG DOM<br>
&lt;krit> GitHub: https://github.com/w3c/svgwg/issues/478<br>
&lt;krit> AmeliaBR: we had a discussion about this back in October. Half of the issue was resolved. We were lacking some data<br>
&lt;krit> AmeliaBR: SVGAngle/SVGLength DOM properties and setting values with units did not match what the spec describes<br>
&lt;krit> AmeliaBR: pasting in previous resolution<br>
&lt;AmeliaBR> from October: * RESOLUTION: When setting `value` on an SVGLength or SVGAngle, the current unit type is preserved if the object has a defined conversion factor from the unit type to user units / implicit degrees.<br>
&lt;krit> AmeliaBR: this is consistent for most browsers<br>
&lt;krit> AmeliaBR: but what if there isn't a clear conversion factor?<br>
&lt;krit> AmeliaBR: Edge tries figure out values: em-units is 16px if no associated font is present<br>
&lt;krit> AmeliaBR: what about newer CSS units with clearly defined px ratio but have no representation in SVG DOM<br>
&lt;krit> AmeliaBR: Lot of inconsistencies. Chrome has most useful: handling things behind the scenes choosing the closest unit type<br>
&lt;krit> AmeliaBR: but it fails in a couple of places<br>
&lt;krit> AmeliaBR: we decided to add no more new enumeration values<br>
&lt;krit> AmeliaBR: long term is to replace everything with cSS OM<br>
&lt;krit> krit: is it worth working out the details for legacy behaviour?<br>
&lt;krit> AmeliaBR: need to consider long term ideal solutions. But we need to ask this question. Especially if implementations are willing to change.<br>
&lt;krit> AmeliaBR: For detached objects I am happy with sepcifying: throw error when you can not figure out a conversion to user unit. I think that should be easy to implement.<br>
&lt;krit> AmeliaBR: For new CSS units, I think we should prefer get/set value as string if the UA supports the value as string.<br>
&lt;krit> AmeliaBR: For CSS property there is support for setting value as string in the DOM object.,<br>
&lt;krit> AmeliaBR: we should get a few more implementers looking at this and give feedback how difficult it would be to update their implementations.<br>
&lt;krit> AmeliaBR: I can create a PR for review with a recommendation. We wouldn't merge it yet but implementers have something to look at.<br>
&lt;krit> krit: Are there issues for each implementation? Can we point to your PR then?<br>
&lt;krit> AmeliaBR: there is one for Chrome.<br>
&lt;krit> AmeliaBR: wanted to file issues once we have the text and decided about a solution.<br>
&lt;krit> AmeliaBR: I'd recommend the Chromium behavior with the one fix I talked about with Frederik in the GitHub issue.<br>
&lt;krit> krit: What does Frederik think about the proposal?<br>
&lt;krit> AmeliaBR: That it would be an issue change and I filed a bug.<br>
&lt;AmeliaBR> s/issue change/easy change/<br>
&lt;krit> AmeliaBR: this includes the throwing behaviour described before.<br>
&lt;krit> AmeliaBR: other browsers on the call<br>
&lt;krit> myles: no comment<br>
&lt;krit> krit: objections?<br>
&lt;krit> Proposed RESOLUTION: Amelia write proposal as PR and gathers feedback from implementers. Idea is to follow Chromium with some fixes described in the issue<br>
&lt;krit> RESOLUTION: Amelia writes proposal as PR and gathers feedback from implementers. Idea is to follow Chromium with some fixes described in the issue<br>
&lt;AmeliaBR> trackbot, end telcon<br>
</details>


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

Received on Monday, 11 February 2019 21:37:44 UTC