- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Fri, 27 Sep 2024 17:22:29 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[css-shapes-2] Interpolation between `shape()` and `path()` needs more detail``, and agreed to the following: * ``RESOLVED: Align `from` with the mandated first move.`` <details><summary>The full IRC log of that discussion</summary> <dbaron> noamr: This is about what happens when you animate betwen a path shape (a pixel based SVg string) and a shape (going farther and farther away from SVG).<br> <dbaron> noamr: There's already some ambiguities. For example with shape you always start from where theshape starts from, whereas SVG path functions start from 0,0.<br> <dbaron> noamr: smfr suggested just not animating.<br> <dbaron> noamr: This creates a cleaner ex.pectation -- just use a tool to convert your path to a shape rather than relying on the browser to convert for you.<br> <TabAtkins> +1 to pretending that path() has a `from 0 0` argument that tinterpolates with the shape()'s `from` argument.<br> <dbaron> noamr: The other option is more complex, is that path with moves it will be the first one to mix them together. In SVG path you can do to and by.<br> <dbaron> noamr: In shape you kind of can.<br> <dbaron> noamr: I think it's between those 2 options.<br> <dbaron> noamr: I think prefer to not interpolate between path andshape, but there was pushback in the issue.<br> <dbaron> noamr: ???<br> <dbaron> TabAtkins: This issue is about whether shape and path interpolate based on the from stuff.<br> <dbaron> noamr: I want to address this issue by ... this specific issue of the from is one divergence between path and shape. There might be more in the futuer. This issues makes me think they shouldn't be interpolated.<br> <dbaron> TabAtkins: There's a trivial transformation of the path string into the shape syntax, we should just do that.<br> <dbaron> TabAtkins: The path syntax will just turn into a moveto and a closepath if it was a shape.<br> <dbaron> noamr: So interpolate path as if it always has "From 0 0"<br> <dbaron> TabAtkins: my assumption this whole time is that the SVG path syntax turns into a bunch of shape commands<br> <emilio> q+<br> <dbaron> TabAtkins: Whavever arguments ?? takes given appropriate default value, in this case `from 0 0`, and interpolation is based onthat.<br> <TabAtkins> s/??/shape()/<br> <dbaron> emilio: There will probably always be a way to turn a path into a shape. It feels a bit weird to do it automatically for interpolation.<br> <noamr> q+<br> <dbaron> TabAtkins: when things are easily inter-convertable, I think it's good to do so.<br> <dbaron> TabAtkins: for example 3 rect functions: inset(), xywh(), ...<br> <kbabbitt> q+<br> <dbaron> emilio: those all compute to same function<br> <Rossen9> ack emilio<br> <dbaron> emilio: this distinction is preserved at computed value time<br> <dbaron> emilio: given how trivial it is to turn a path into a shape, it feels like adding the special code path ???, ... it's fine<br> <noamr> q+<br> <dbaron> TabAtkins: I don't have a strong opinion, but doing it since we can seems right.<br> <dbaron> noamr: The difference here is that usually you start your path with a moveto.<br> <Rossen9> ack noamr<br> <TabAtkins> TabAtkins: given how trivial it is to turn a path into a shape, it feels like something we should do for the author ^_^<br> <dbaron> noamr: If the path doesn'tstart with 0 0.<br> <dbaron> noamr: so your path will turn into a shape that doesn't have a from.<br> <dbaron> noamr: It starts it on the wrong foot.<br> <dbaron> noamr: Something about thsi conversion doesn't feel right.<br> <dbaron> noamr: It will be not exctly as intended.<br> <dbaron> noamr: Telling the developer to turn it into a shape yourself and decide if it's a moveto or a from, or use several movetos in the beginning, would be cleaner.<br> <dbaron> kbabbitt: A couple things: I'm curious why shape starts with this from to begin with. It seems like syntactic sugar for a move but maybe I'm missing something.<br> <dbaron> TabAtkins: All the shape functions have an origin. That ??? the motion-path.<br> <dbaron> TabAtkins: A starting point for where the motion path is from rather than forcing them to start at 0,0<br> <dbaron> kbabbitt: I'll have to take a closer look at motion path.<br> <dbaron> kbabbitt: I was just looking at the grammar for motion path, it requires that the first command is a move.<br> <dbaron> kbabbitt: Another alternative: have ?? line up with the first move in the path.<br> <kbabbitt> s/??/from/<br> <dbaron> ChrisL: That was a design decision, every path segment creates the start position for the next segment, so has to start with a move.<br> <dbaron> noamr: We need to explore whether this is enforced in the shape segment in CSS. If it doesn't that solves it.<br> <kbabbitt> s/grammar for motion path/grammar for SVG path/<br> <lea> can't we just default to a move to 0,0 if no move is specified?<br> <TabAtkins> https://drafts.fxtf.org/motion-1/#offset-position-property lets you change the "starting point" of a path that doesn't manually specify its start<br> <dbaron> noamr: I think the resolution should be to align from with the first segment which is supposed to be a move.<br> <dbaron> noamr: With the constraint that we will check if this is actually enforced by browsers.<br> <ChrisL> s/so has to/so the first has to/<br> <dbaron> Proposed: Align `from` with the mandated first move.<br> <dbaron> RESOLVED: Align `from` with the mandated first move.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10740#issuecomment-2379740446 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 27 September 2024 17:22:30 UTC