Re: [csswg-drafts] [css-values] Stacked modifiers in definitions (#6085)

It's intended that at least some of the modifiers be stackable; if we need to make it clearer in the spec, we can.

> There are already rules that says that the ̀{A,B} modifier can be stacked on top of #

This is not stacking; the two combine to form a new modifier. `foo#{1,2}` is completely different from `[foo#]{1,2}`. The former allows `foo` and `foo, foo` only; the latter allows `foo, foo foo, foo, foo` (two repetitions of `foo#`, the first being two reps and the second being three reps) and many others.

------

So, of the five relevant mulipliers (`*`, `+`, `?`, `#`, and `{}`):

* `+#` is a useful stack to indicate comma-or-space separation.
* `#+` is *similar* and in some cases accepts identical inputs (depending on what it's modifying), but overall is confusing and probably shouldn't be used.
* `#{}` is already defined and is not technically a stack at all, but rather a modified `#`
* `#?` is potentially valuable, since `#` is one-or-more by default; it serves the same role as `*` does to `+`.
* Literally every other combination is either redundant or useless, I think.

So I'd be happy to just define that only `+#` and `#?` are allowed (and `+#` shouldn't be *used*, but is preserved for the purpose of specifying some legacy grammars), and disallowing everything else.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6085#issuecomment-799898161 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 16 March 2021 02:36:41 UTC