Skip to content

Conversation

@noamr
Copy link
Collaborator

@noamr noamr commented Mar 6, 2022

Avoids an ambiguity where the second radius and angle can both come from calc

Closes #6925

Avoids an ambiguity where the second radius and angle can both come from calc

Closes w3c#6925
@noamr
Copy link
Collaborator Author

noamr commented Mar 6, 2022

@tabatkins ?

@tabatkins
Copy link
Member

I'm not against this in principle (it probably does make things slightly more readable, actually), but what's the ambiguity concern? You can statically determine the type of a calc(); it'll only be a valid radius if the type is {length:1} or {percentage:1}, and a valid angle if the type is {angle:1}.

@noamr
Copy link
Collaborator Author

noamr commented Mar 7, 2022

I'm not against this in principle (it probably does make things slightly more readable, actually), but what's the ambiguity concern? You can statically determine the type of a calc(); it'll only be a valid radius if the type is {length:1} or {percentage:1}, and a valid angle if the type is {angle:1}.

I didn't know that! But in any case it's ambiguous for reading, especially with custom properties

@tabatkins
Copy link
Member

Yeah that's very fair. And the whole point of this syntax is optimizing for authorability and readability, so yeah, let's go for it.

@tabatkins tabatkins merged commit 5aff2a3 into w3c:main Mar 7, 2022
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

Successfully merging this pull request may close these issues.

[css-shapes-2] Ambiguity when creating an arc between angle & ry

2 participants