Skip to content

Commit a58e0af

Browse files
committed
[css-values-5] Be consistent about brackets w3c#10457
1 parent 4fd47d8 commit a58e0af

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

css-values-5/Overview.bs

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ Value Definition Syntax</h2>
8181

8282
<ol>
8383
<li value=5>Boolean combinations of a conditional notation.
84-
These are written using the <<boolean [ &lt;test&gt; ]>> notation,
84+
These are written using the <<boolean[]>> notation,
8585
and represent recursive expressions of boolean logic
8686
using keywords and parentheses,
87-
applied to the type specified in brackets,
88-
e.g. <<boolean [ ( &lt;media-feature&gt; ) ]>> to express [=media queries=].
87+
applied to the grammar specified in brackets,
88+
e.g. <<boolean[ ( &lt;media-feature&gt; ) ]>> to express [=media queries=].
8989
</ol>
9090

9191
<h3 id=component-functions>
@@ -213,34 +213,34 @@ Commas in Function Arguments</h4>
213213
but it <em>should</em> be avoided unless necessary.
214214

215215
<h3 id=boolean>
216-
Boolean Expression Multiplier <<boolean>></h3>
216+
Boolean Expression Multiplier <<boolean[]>></h3>
217217

218218
Several contexts
219219
(such as ''@media'', ''@supports'', ''if()'', ...)
220220
specify conditions,
221221
and allow combining those conditions with boolean logic (and/or/not/grouping).
222222
Because they use the same non-trivial recursive syntax structure,
223-
the special <dfn><<boolean>></dfn> production represents this pattern generically.
223+
the special <dfn><<boolean[]>></dfn> production represents this pattern generically.
224224

225-
The <<boolean>> notation wraps another value type in the square brackets within it,
226-
e.g. &lt;boolean [ &lt;test&gt; ]&gt;,
225+
The <<boolean[]>> notation wraps another value type in the square brackets within it,
226+
e.g. &lt;boolean[ &lt;test&gt; ]&gt;,
227227
and represents that value alone as well as
228228
boolean combinations of those values
229229
using the ''not'', ''and'', and ''or'' keywords
230230
and grouping parenthesis.
231231
It is formally equivalent to:
232232

233233
<xmp class=prod>
234-
<boolean [ <test> ]> = not <boolean-group> | <boolean-group>
235-
[ [ and <boolean-group> ]*
236-
| [ or <boolean-group> ]* ]
234+
<boolean[ <test> ]> = not <boolean-group> | <boolean-group>
235+
[ [ and <boolean-group> ]*
236+
| [ or <boolean-group> ]* ]
237237

238238
<boolean-group> = <test> | ( <boolean> ) | <general-enclosed>
239239
</xmp>
240240

241-
The <<boolean>> production represents a true, false, or unknown value,
241+
The <<boolean[]>> production represents a true, false, or unknown value,
242242
with top-level unknown values
243-
(those not directly nested inside the grammar of another <<boolean>>)
243+
(those not directly nested inside the grammar of another <<boolean[]>>)
244244
resolving to false unless otherwise specified.
245245
Its value is resolved using 3-value Kleene logic;
246246
see [[#boolean-logic]] for details.
@@ -249,14 +249,14 @@ Boolean Expression Multiplier <<boolean>></h3>
249249
For example, the ''@container'' rule allows a wide variety of tests:
250250
including size queries, style queries, and scroll-state queries.
251251
All of these are arbitrarily combinable with boolean logic.
252-
Using <<boolean>>, the grammar for an ''@container'' query is:
252+
Using <<boolean[]>>, the grammar for an ''@container'' query is:
253253

254254
<xmp class=prod>
255-
<container-query> = <boolean [ <cq-test> ]>
255+
<container-query> = <boolean[ <cq-test> ]>
256256
<cq-test> = (<size-query>) | style( <style-query> ) | scroll-state( <scroll-state-query> )
257-
<size-query> = <boolean [ ( <size-feature> ) ]> | <size-feature>
258-
<style-query> = <boolean [ ( <style-feature> ) ]> | <style-feature>
259-
<scroll-state-query> = <boolean [ ( <scroll-state-feature> ) ]> | <scroll-state-feature>
257+
<size-query> = <boolean[ ( <size-feature> ) ]> | <size-feature>
258+
<style-query> = <boolean[ ( <style-feature> ) ]> | <style-feature>
259+
<scroll-state-query> = <boolean[ ( <scroll-state-feature> ) ]> | <scroll-state-feature>
260260
</xmp>
261261
</div>
262262

@@ -265,7 +265,7 @@ Boolean Expression Multiplier <<boolean>></h3>
265265
will be parsed and considered “unknown”,
266266
rather than invalidating the production.
267267
For consistency with that allowance,
268-
the <css>&lt;test></css> term in a <<boolean>>
268+
the <css>&lt;test></css> term in a <<boolean[]>>
269269
should be defined to match <<general-enclosed>>.
270270

271271
<h3 id=css-syntax>
@@ -1332,18 +1332,16 @@ Conditional Value Selection: the ''if()'' notation</h3>
13321332
<pre class=prod>
13331333
<dfn><<if()>></dfn> = if( [ <<if-condition>> : <<declaration-value>>? ; ]*
13341334
<<if-condition>> : <<declaration-value>>? ;? )
1335-
<dfn><<if-condition>></dfn> =
1335+
<dfn><<if-condition>></dfn> = <<boolean[ <<if-test>> ]>> | else
1336+
<dfn><<if-test>></dfn> =
13361337
supports( [ <<supports-condition>> | <<ident>> : <<declaration-value>> ] ) |
13371338
media( <<media-query>> ) |
1338-
style( <<style-query>> ) |
1339-
else
1339+
style( <<style-query>> )
13401340
</pre>
13411341

13421342
The <dfn value for="if()">else</dfn> keyword represents
13431343
a condition that is always true.
13441344

1345-
ISSUE: Incorporate boolean syntax for combining these queries.
1346-
13471345
<!-- Big Text: toggle()
13481346

13491347
█████▌ ███▌ ███▌ ███▌ █▌ █████▌ ██ ██
@@ -3141,7 +3139,7 @@ Safely Handling Overly-Long Substitution</h3>
31413139
Appendix B: Boolean Logic</h2>
31423140

31433141
In order to accommodate future extensions of CSS,
3144-
<<boolean>> productions generally interpret their <<general-enclosed>> grammar branch as unknown,
3142+
<<boolean[]>> productions generally interpret their <<general-enclosed>> grammar branch as unknown,
31453143
and their boolean logic is resolved using 3-value Kleene logic.
31463144
In some cases (such as ''@supports''),
31473145
<<general-enclosed>> is instead defined as false;
@@ -3169,7 +3167,7 @@ Appendix B: Boolean Logic</h2>
31693167
false if <em>all</em> of them are false,
31703168
and unknown otherwise (i.e. at least one unknown, but no true).
31713169

3172-
If a “top-level” <<boolean>> is unknown,
3170+
If a “top-level” <<boolean[]>> is unknown,
31733171
and the containing context doesn't otherwise define
31743172
how to handle unknown conditions,
31753173
it evaluates to false.

0 commit comments

Comments
 (0)