Re: [csswg-drafts] [css-shapes-2] Minor comments on shape() (#5841)

> I was a few seconds late providing review feedback on #5711 . It's probably easier to read my comments inline there, but I'll repeat them here.
> 
> 1. Minor typo: corresponds
Ack

> 2. The spec needs to describe animation, specifically that it works the same as SVG paths since the `shape` syntax is a mapping to SVG path primitives. It should probably call out the fact that the `curve` operator actually produces two segment types, so it may not be possible to smoothly animate between two `curve`s.
> 3. For that reason, I'd consider splitting cubic and quadratic into different operations rather than rely on the number of parameters
> 4. Similarly, a `curve` and `smooth` might actually be the same segment type as far as animation is concerned! Confusing!

I agree that consistency is of value, but I also dislike how SVG path animations are so restrictive, and I wish there was something we could do about it. Maybe we can word it in a way that releases this from this restriction? :(

My original thought was, instead, to treat all path segments (except move to/by) as cubic bezier curves - quadratic curves (and arcs?) would have the 2 control points at the same spot, and lines would have the two control points within the line, evenly distributed. This would allow nice smooth animations between lines/quadratic/cubic cutves/arcs without the author having to manually declare all of them as cubic bezier curves.

Maybe this can also be backported to SVG, with an opt-in attribute to maintain backwards compatibility.

> 5. I don't think `via` is a good term for bezier control points. The curve does not (typically) go through those points, which is what the definition of via would suggest. Maybe `using` is a better term?

Right. `using` would be maybe more accurate.

> 6. In SVG syntax you specify the control points before the end point. Is there a reason this was not followed here? The rationale behind that in SVG is that the point specified last in commands is where the pen ends up (where the next segment starts).

I specified it like this because the word by/to is important in order to understand the meaning of the rest of the coordinates. But I agree that it might make more sense to have the end point at the end of the phrase.

-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5841#issuecomment-755946230 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 7 January 2021 07:44:53 UTC