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-values] Add slash as multiplier #9691

Closed
SebastianZ opened this issue Dec 10, 2023 · 2 comments
Closed

[css-values] Add slash as multiplier #9691

SebastianZ opened this issue Dec 10, 2023 · 2 comments

Comments

@SebastianZ
Copy link
Contributor

SebastianZ commented Dec 10, 2023

There are a few places in the specs that define repetitions of one or more values separated by slashes. The most prominent of them being the placement shorthands in CSS Grid.

As such repetitions are becoming more common, it might make sense to add a multiplier for it. So syntax definitions become more concise and a little easier to read.

With that, <grid-line> [ / <grid-line> ]{0,3} could become <grid-line>/{1,4}.

If the multiplier character should actually be a slash as well or another character can be bikeshedded.

(I think this was brought up earlier by someone else, maybe @fantasai, in a PR discussion but I can't remember.)

Sebastan

@SebastianZ SebastianZ added the css-values-4 Current Work label Dec 10, 2023
@fantasai
Copy link
Collaborator

I'm not sure this is worth doing, because it's not particularly common and adding rarely-used multipliers makes it harder for people reading our syntax, since it's unavoidably unfamiliar.

@tabatkins
Copy link
Member

Yeah, slashes are already very rarely used, and in general we don't want to make it easier to use - they should be reserved only for when we absolutely can't express a reasonable, unambiguous grammar otherwise.

So agreed, close no change.

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

No branches or pull requests

3 participants