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] Allow path() to scale like SVG #11628

Open
noamr opened this issue Jan 31, 2025 · 0 comments
Open

[css-shapes] Allow path() to scale like SVG #11628

noamr opened this issue Jan 31, 2025 · 0 comments

Comments

@noamr
Copy link
Collaborator

noamr commented Jan 31, 2025

A concrete proposal for the concerns raised in #10647.
I think we should diverge path and shape, in a way that path always concretely translates to a path, and maintains its relationship with SVG, and shape is more of a "recipe" for creating a path.

Specifically, path falls short because it uses a scalable format from SVG, but it can't be scaled to the reference-box, because it doesn't have a view-box or a fit, which makes path not very useful for anything responsive.

Suggesting something like the following syntax for path:

path(<fill-rule>?  || <string> || [ [ contain | cover | fill | scale-down  ]? || <number>{2,4} ]?)

Where if a view-box (and potentially a fit) are given, the SVG path would scale to the reference box given those rules.

@LeaVerou thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant