Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS shape() function #1033

Open
2 tasks done
noamr opened this issue Jan 6, 2025 · 7 comments
Open
2 tasks done

CSS shape() function #1033

noamr opened this issue Jan 6, 2025 · 7 comments

Comments

@noamr
Copy link

noamr commented Jan 6, 2025

こんにちは TAG-さん!

I'm requesting a TAG review of CSS shape() function.

{{One paragraph summary of the feature, ideally copy-pasted from your Explainer.}}

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: This is already enabled by default in chromium and webkit.
  • The group where the work on this specification is currently being done: CSS
  • The group where standardization of this work is intended to be done (if different from the current group):
  • Major unresolved issues with or opposition to this specification: None
  • This work is being funded by: Google

You should also know that...
There is an open issue to bring more CSS-like capabilities to path, in a way that stays closer to SVG.

@martinthomson
Copy link
Contributor

@noamr, the template here seems to be incomplete. I was going to just delete the instructions, but I also notice that you missed a few fields. Would you mind updating it?

@noamr
Copy link
Author

noamr commented Feb 19, 2025

@noamr, the template here seems to be incomplete. I was going to just delete the instructions, but I also notice that you missed a few fields. Would you mind updating it?

Oops, sorry. Done I think?

@martinthomson
Copy link
Contributor

Thanks! (That link is particularly interesting to me, because I don't like what appears to be a drift between this and SVG.)

On that topic, is there more that you have about why the CSS working group chose to invent an entirely new syntax for what is substantially similar to SVG <path>? It seems to me like you are deliberately losing a bunch of advantages (like being able to prototype shapes using SVG and just copy them over) and inviting the possibility of the two drifting apart. Without an explainer, there's nowhere that really covers alternatives.

(I'm not 100% sure that this is indeed not an SVG path because the spec says "The rest of the arguments define a list of path data commands, identical to that of an SVG Path, which the function represents." It seems not-identical to me, given the level of re-specification.)

@noamr
Copy link
Author

noamr commented Feb 19, 2025

Thanks! (That link is particularly interesting to me, because I don't like what appears to be a drift between this and SVG.)

On that topic, is there more that you have about why the CSS working group chose to invent an entirely new syntax for what is substantially similar to SVG <path>? It seems to me like you are deliberately losing a bunch of advantages (like being able to prototype shapes using SVG and just copy them over) and inviting the possibility of the two drifting apart. Without an explainer, there's nowhere that really covers alternatives.

Those advantages are not "lost" because path() still exists, and a conversion function from path() to shape() is trivial.
shape() is a superset of what SVG/path() can do because it's responsive and SVG is only scalable and not responsive.
In that sense, converting the other way, from shape() to path() or SVG, requires knowing the CSS state, as well as the size of the box. The same shape() can result in many different paths - a shape is a "recipe" to make paths based on the CSS environment.

(I'm not 100% sure that this is indeed not an SVG path because the spec says "The rest of the arguments define a list of path data commands, identical to that of an SVG Path, which the function represents." It seems not-identical to me, given the level of re-specification.)

Yea, it was more identical at the beginning, I'll remove this from the spec.

@martinthomson
Copy link
Contributor

Thanks. FWIW, that would be very useful context to add to a specification.

@noamr
Copy link
Author

noamr commented Feb 19, 2025

Thanks. FWIW, that would be very useful context to add to a specification.

Noted, I'll add this to the specification.
Thanks for the input!

@noamr
Copy link
Author

noamr commented Feb 19, 2025

Added spec PR: w3c/csswg-drafts#11743

@torgo torgo added this to the 2025-02-24-week milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants