- From: Lea Verou via GitHub <sysbot+gh@w3.org>
- Date: Thu, 01 Feb 2024 20:12:35 +0000
- To: public-css-archive@w3.org
> Isn’t this almost exactly what #5674 was about? > > (I’m pretty sure I’m misting something essential here. It’s late.) Hadn't seen that! For anyone else, this is the grammar #5674 resulted in: https://drafts.csswg.org/css-shapes-2/#shape-function That’s great news, this means this proposal is a relatively smaller delta that can be used to improve the existing `shape()` function that’s already in shapes-2! Lots of commonalities. I love that it also uses `by | to`, which I was a bit unsure about. I guess if we both ended up with the same prepositions that's a good signal they may actually be intuitive, but the concerns I expressed above still stand. It does seem to follow SVG precedent a little more closely, whereas the syntax I’m proposing is a more thorough re-architecting, which seems even more appropriate if we're introducing a brand new function. From a quick look some differences are: - My proposal completely removes the move and close commands and introduces a separate function to combine shapes (for more motivation around that, read the proposal) - Instead of line-specific commands for horizontal and vertical lines, in my proposal *all* endpoints have a horizontal/vertical only syntax. Then all that's needed for h/v lines is the line command. - My proposal introduces an alternative `arc` syntax that follows author intent more closely by allowing them to specify the center and angle rather than the endpoint. - In my proposal, smooth curves are not a separate command, it's just `curve [bezier | quadratic]` without control points. Though I really like the idea that if only one control point is specified, the surve is automatically quadratic. I still think we should find a syntax that does it all under `curve` though, having a separate `smooth` command simply to omit arguments seems like a confusing mental model. Some comments on the current `draw()` syntax: - `cw` and `ccw` violate the [TAG principle against abbreviations](https://w3ctag.github.io/design-principles/#css-naming) - I’m worried `<arc-size>` being `small | large` makes no sense when you see something like `arc to 1em 1em of 1em large`. -- GitHub Notification of comment by LeaVerou Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9889#issuecomment-1922152988 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 1 February 2024 20:12:38 UTC