csswg-drafts
csswg-drafts copied to clipboard
[css-values-5][css-conditional-5][css-cascade-5] Boolean Multiplier for ValDef syntax
We have a number of places in CSS where we use a boolean syntax for combining queries. It takes the form
<x-query> = not <x-group> | <x-group> [ [ and <x-group> ]* | [ or <x-group> ]* ]
<x-group> = <x> | ( <x-query> ) | <general-enclosed>
Tab and I propose creating a new valdef syntax representing the "boolean expression multiplication" of a given production <x>, so that this can be more easily, obviously, and correctly re-used. Suggested syntax is <boolean [ <x> ]>, with the brackets both serving as a grouping operator and mimicking the range parameters in numerical types e.g. <number [-1, 1]>.
maybe boolean-expression would be clearer than boolean?
Closing as duplicate of https://github.com/w3c/csswg-drafts/issues/10457