You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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.
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
The text was updated successfully, but these errors were encountered: