[css-shapes-2] Allow `path()` to scale like SVG
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #10647 and the CSS Shapes 2 proposal for path() described here. Work out the syntax and scaling behavior for view-box and fit, then verify that the resulting proposal preserves the stated relationship with SVG and supports responsive reference-box scaling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100