-
Notifications
You must be signed in to change notification settings - Fork 757
Description
See https://drafts.csswg.org/css-shapes-2/#typedef-shape-arc-command:
<arc-command> = arc <by-to> <coordinate-pair> of <length-percentage>{1,2} [ <arc-sweep> || <arc-size> || <angle> ]
There could be arguments that are ambiguous at time of parsing between the second length-percentage radius and the angle.
For example, unclear how to parse:
arc to 10px 10px of 5px calc(var(--some-number) * 2) cw
Is the calc value the angle or the y radius?
Even if it was possible for the parser to figure this out by following the calc parameters, this is ambiguous to the reader.
Options:
- Make it mandatory to have 2 radii, maybe allowing
autoor so for the second one to represent symmetrical radii, like:
arc to 10px 10px of 5px auto calc(var(--some-number)*2) cw // angle
arc to 10px 10px of 5px calc(var(--some-number)*2) cw // radius
- add a keyword or a function(
rotate?) before the angle, like:
arc to 10px 10px of 5px rotate(calc(var(--some-number)*2)) cw // angleorarc to 10px 10px of 5px rotate calc(var(--some-number)*2) cw // angle
arc to 10px 10px of 5px calc(var(--some-number)*2) cw // radius
I think I prefer the rotate as keyword option. Maybe there are more options?