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-transforms] Minor syntax rewrite #9394

Closed
wants to merge 1 commit into from
Closed

Conversation

cdoublev
Copy link
Collaborator

  • add missing group around function arguments
  • use multipliers instead of repeating symbols

@tabatkins
Copy link
Member

You don't need a group around a function's arguments. In this particular case it's becuase there's nothing to group in the first place, but more generally function syntax implicitly groups its arguments. (This is a relatively recent addition to the grammar, reflecting what a lot of people were accidentally doing anyway.)

I also think it's fine to repeat arguments a little, so long as it's not a clarity issue. It's easier to read <length> , <length> than <length>{1,2}, in my opinion. So either way is correct, but none of the examples here look like they'd particularly benefit from changing.

@tabatkins tabatkins closed this Sep 28, 2023
@cdoublev
Copy link
Collaborator Author

I missed this change, sorry. Actually it is <length>#{1,2}, which requires to know the meaning of #, instead of <length> , <length>?, which requires to know about the comma-elision rule, but I admit the latter is still easier to read. Thanks for the feedback.

@cdoublev cdoublev deleted the pr-9394 branch September 28, 2023 19:05
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.

2 participants