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-shapes-1] Define equivalent paths #8524

Closed
tabatkins opened this issue Mar 3, 2023 · 3 comments
Closed

[css-shapes-1] Define equivalent paths #8524

tabatkins opened this issue Mar 3, 2023 · 3 comments
Labels
css-shapes-1 Current Work

Comments

@tabatkins
Copy link
Member

Shapes 1 currently defines all the shapes functions as, well, shapes, which is pretty reasonable for what it was designed for. Over time we've expanded on these functions and their use-cases; notably, we added path() and shape() (declaring that they auto-close to form a closed shape if necessary), but also referenced the functions in places that want to use them as a path, like in 'offset-path'.

When used as a path, rather than as a shape, we need to define what exactly the path is - where it starts, and how it continues. Currently 'offset-path' does that explicitly (for the set of shape functions it knew about; it's missing a few newer ones), but (a) it seems better to define this alongside the shapes, so lists can't get out-of-date, and (b) I expect that any other uses of shape-as-path would want to use the same definitions.

All the starting-point definitions in offset-path make sense to me; should we move those to the function definitions in Shapes?

@tabatkins tabatkins added the css-shapes-1 Current Work label Mar 3, 2023
@astearns
Copy link
Member

astearns commented Mar 4, 2023

It sounds OK to me, though I think it’s a bit weird to have the path stuff defined in shapes-1 with no way of testing it without referring to other modules. If offset-path is the only place where that is used it might make sense to keep it there until we have another consumer.

@tabatkins
Copy link
Member Author

My concern is that the spec drifted out of date pretty readily - we were missing the new rect functions, and won't mention shape() (but that's probably handwaveable, since it's just an alternate version of path()).

But I could be okay with moving these to a normative appendix, with a note that anything missing from the Shapes spec is an error and that this might move to that spec later.

@tabatkins
Copy link
Member Author

I went ahead and did that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-shapes-1 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants