Skip to content

Commit 487ba2b

Browse files
committed
[css-values-5] Replace <boolean[]> with <boolean-expr[]> #10457
1 parent e4e057c commit 487ba2b

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

css-values-5/Overview.bs

Lines changed: 22 additions & 22 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[]>> notation,
84+
These are written using the <<boolean-expr[]>> notation,
8585
and represent recursive expressions of boolean logic
8686
using keywords and parentheses,
8787
applied to the grammar specified in brackets,
88-
e.g. <<boolean[ ( &lt;media-feature&gt; ) ]>> to express [=media queries=].
88+
e.g. <<boolean-expr[ ( &lt;media-feature&gt; ) ]>> to express [=media queries=].
8989
</ol>
9090

9191
<h3 id=component-functions>
@@ -213,16 +213,16 @@ 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-expr[]>></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-expr[]>></dfn> production represents this pattern generically.
224224

225-
The <<boolean[]>> notation wraps another value type in the square brackets within it,
225+
The <<boolean-expr[]>> notation wraps another value type in the square brackets within it,
226226
e.g. &lt;boolean[ &lt;test&gt; ]&gt;,
227227
and represents that value type alone as well as
228228
boolean combinations
@@ -231,33 +231,33 @@ Boolean Expression Multiplier <<boolean[]>></h3>
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-expr[ <test> ]> = not <boolean-expr-group> | <boolean-expr-group>
235+
[ [ and <boolean-expr-group> ]*
236+
| [ or <boolean-expr-group> ]* ]
237237

238-
<boolean-group> = <test> | ( <boolean[ <test> ]> ) | <general-enclosed>
238+
<boolean-expr-group> = <test> | ( <boolean-expr[ <test> ]> ) | <general-enclosed>
239239
</xmp>
240240

241-
The <<boolean[]>> production represents a true, false, or unknown value.
241+
The <<boolean-expr[]>> production represents a true, false, or unknown value.
242242
Its value is resolved using 3-value Kleene logic,
243243
with top-level unknown values
244-
(those not directly nested inside the grammar of another <<boolean[]>>)
244+
(those not directly nested inside the grammar of another <<boolean-expr[]>>)
245245
resolving to false unless otherwise specified;
246246
see [[#boolean-logic]] for details.
247247

248248
<div class=example>
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
252+
Using <<boolean-expr[]>>, the grammar for an ''@container'' query
253253
could be written as:
254254

255255
<xmp class=prod>
256-
<container-query> = <boolean[ <cq-test> ]>
256+
<container-query> = <boolean-expr[ <cq-test> ]>
257257
<cq-test> = (<size-query>) | style( <style-query> ) | scroll-state( <scroll-state-query> )
258-
<size-query> = <boolean[ ( <size-feature> ) ]> | <size-feature>
259-
<style-query> = <boolean[ ( <style-feature> ) ]> | <style-feature>
260-
<scroll-state-query> = <boolean[ ( <scroll-state-feature> ) ]> | <scroll-state-feature>
258+
<size-query> = <boolean-expr[ ( <size-feature> ) ]> | <size-feature>
259+
<style-query> = <boolean-expr[ ( <style-feature> ) ]> | <style-feature>
260+
<scroll-state-query> = <boolean-expr[ ( <scroll-state-feature> ) ]> | <scroll-state-feature>
261261
</xmp>
262262
</div>
263263

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

272272
<h3 id=css-syntax>
@@ -1342,7 +1342,7 @@ Conditional Value Selection: the ''if()'' notation</h3>
13421342
<pre class=prod>
13431343
<dfn><<if()>></dfn> = if( [ <<if-condition>> : <<declaration-value>>? ; ]*
13441344
<<if-condition>> : <<declaration-value>>? ;? )
1345-
<dfn><<if-condition>></dfn> = <<boolean[ <<if-test>> ]>> | else
1345+
<dfn><<if-condition>></dfn> = <<boolean-expr[ <<if-test>> ]>> | else
13461346
<dfn><<if-test>></dfn> =
13471347
supports( [ <<supports-condition>> | <<ident>> : <<declaration-value>> ] ) |
13481348
media( <<media-query>> ) |
@@ -3192,7 +3192,7 @@ Safely Handling Overly-Long Substitution</h3>
31923192
Appendix B: Boolean Logic</h2>
31933193

31943194
In order to accommodate future extensions of CSS,
3195-
<<boolean[]>> productions generally interpret their <<general-enclosed>> grammar branch as unknown,
3195+
<<boolean-expr[]>> productions generally interpret their <<general-enclosed>> grammar branch as unknown,
31963196
and their boolean logic is resolved using 3-value Kleene logic.
31973197
In some cases (such as ''@supports''),
31983198
<<general-enclosed>> is instead defined as false;
@@ -3220,7 +3220,7 @@ Appendix B: Boolean Logic</h2>
32203220
false if <em>all</em> of them are false,
32213221
and unknown otherwise (i.e. at least one unknown, but no true).
32223222

3223-
If a “top-level” <<boolean[]>> is unknown,
3223+
If a “top-level” <<boolean-expr[]>> is unknown,
32243224
and the containing context doesn't otherwise define
32253225
how to handle unknown conditions,
32263226
it evaluates to false.
@@ -3276,7 +3276,7 @@ Changes</h2>
32763276
* Changed ''*progress()'' functions to use commas for argument separation,
32773277
for consistency with ''*mix()'' and ''clamp()''.
32783278
(<a href="https://github.com/w3c/csswg-drafts/issues/10489">Issue 10489</a>)
3279-
* Defined new <<boolean[]>> multipler for the [=value definition syntax=].
3279+
* Defined new <<boolean-expr[]>> multipler for the [=value definition syntax=].
32803280
(<a href="https://github.com/w3c/csswg-drafts/issues/10457">Issue 10457</a>)
32813281
* Imported definition of [=arbitrary substitution function=] from [[css-variables-1]].
32823282
(<a href="https://github.com/w3c/csswg-drafts/issues/10679">Issue 10679</a>)
@@ -3307,7 +3307,7 @@ Additions Since Level 4</h3>
33073307
* Added the ''random()'' and ''random-item()'' functions.
33083308
* Added the ''sibling-count()'' and ''sibling-index()'' functions.
33093309
* Added the ''calc-size()'' function, and the related 'interpolate-size' property.
3310-
* Added the <<boolean[]>> syntax notation to the [=value definition syntax=].
3310+
* Added the <<boolean-expr[]>> syntax notation to the [=value definition syntax=].
33113311

33123312

33133313
<h2 class="no-num" id="security">

0 commit comments

Comments
 (0)