Re: [csswg-drafts] [css-transforms-1] 'view-box' definition doesn't make sense (#4662)

The CSS Working Group just discussed `[css-transforms-1] 'view-box' definition doesn't make sense`, and agreed to the following:

* `RESOLVED: No change to the behavior, add a note to the spec`
* `RESOLVED: move the box keyword definitions on css-box and publish a new working draft`
* `RESOLVED: rebase the rest of the spec referring to these definitions to point to css-box`
* `RESOLVED: Move margin-trim to css-box-4 before republishing`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> Topic:  [css-transforms-1] 'view-box' definition doesn't make sense<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/4662<br>
&lt;emilio> TabAtkins: the definition seems to not make sense<br>
&lt;emilio> ... the origin and size of the box are not related<br>
&lt;emilio> ... says that the origin of the coordinate space is the viewbox start<br>
&lt;emilio> ... and the size is the size of the viewbox<br>
&lt;emilio> ... so for example if you have a viewbox="20 20 100 100"<br>
&lt;emilio> ... the origin of the coordinate space is outside of the viewport, such as the origin is at (-20, -20)<br>
&lt;emilio> ... so that the viewbox is based off a rectangle outside of the svg's viewport<br>
&lt;emilio> heycam: so before CSS transforms, in svg you couldn't use percents inside transform so this was a non-issue<br>
&lt;emilio> ... I wonder if the issue is the way we're defining this rectangle<br>
&lt;emilio> ... Maybe it doesn't make sense to define that rect<br>
&lt;emilio> emilio: for percents in transforms you just need a basis so you don't need any origin right?<br>
&lt;RossenF2F> q?<br>
&lt;emilio> fantasai: yeah but other stuff references the view-box<br>
&lt;emilio> TabAtkins: and the origin matters for rotations and scales<br>
&lt;emilio> emilio: fair<br>
&lt;emilio> myles_: pretend you use transform-box: view-box and rotate by 3deg or something, what would you expect?<br>
&lt;emilio> TabAtkins: multiple acceptable answers, but the issue is that the size and the origin are not related, unlike other boxes<br>
&lt;emilio> fantasai: the issue is that this is how transforms have been defined in SVG<br>
&lt;emilio> fantasai: [reads AmeliaBR's comment in the issue]<br>
&lt;emilio> https://github.com/w3c/csswg-drafts/issues/4662#issuecomment-576496516<br>
&lt;emilio> TabAtkins: ok if it's what SVG uses by default then sure, whatever<br>
&lt;emilio> ... but I'd like it to be called out explicitly<br>
&lt;emilio> faceless2: The way we see the viewbox is just a translate transform<br>
&lt;emilio> ... I'm not sure it's as confusing as it sounds<br>
&lt;emilio> TabAtkins: my issue is that if you choose transform-origin: 100% 100% the point you get makes no sense<br>
&lt;emilio> ... but sure if it's legacy then fine, I thought it was invented recently as it was added after other changes<br>
&lt;emilio> ... so I'm ok with the behavior but I want to clarify that this is legacy svg behavior<br>
&lt;emilio> fantasai: there are other specs that reference these values somewhat inconsistently<br>
&lt;emilio> ... we copied them all out into the box model module<br>
&lt;TabAtkins> https://drafts.csswg.org/css-box/#keywords<br>
&lt;emilio> ... I want to change the definition of viewbox to account for this and then change all specs to reference those definitions<br>
&lt;emilio> ... any objections to doing that?<br>
&lt;emilio> RossenF2F: it seems something we should do, and seems we should close this with no change<br>
&lt;emilio> ... with the note added to the spec explaining why<br>
&lt;emilio> TabAtkins: I guess we'll add it to the box spec<br>
&lt;emilio> RossenF2F: sure<br>
&lt;emilio> fantasai: do we need another keyword to reference the box tab was talking about? (size of viewbox at the position of viewbox?)<br>
&lt;emilio> RossenF2F: probably not<br>
&lt;emilio> ... objections to the proposed resolution?<br>
&lt;emilio> RESOLVED: No change to the behavior, add a note to the spec<br>
&lt;emilio> RESOLVED: move the box keyword definitions on css-box and publish a new working draft<br>
&lt;emilio> RESOLVED: rebase the rest of the spec referring to these definitions to point to css-box<br>
&lt;emilio> fantasai: I propose to move the only non-css2 feature in css-box (margin-trim) to level 4 and move this to CR and co. fast so that other specs can depend on it<br>
&lt;emilio> RossenF2F: sounds reasonable, objections?<br>
&lt;fantasai> s/spe referring/specs referring/<br>
&lt;fantasai> s/spec referring/specs referring/<br>
&lt;emilio> RESOLVED: Move margin-trim to css-box-4 before republishing<br>
</details>


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

Received on Thursday, 23 January 2020 11:49:54 UTC