@@ -41,10 +41,10 @@ and supported font technologies.
4141It also adds generalized conditional rules
4242and chained conditional rules.
4343
44- It also adds an ''@if '' rule,
44+ It also adds an ''@when '' rule,
4545which generalizes the concept of a conditional rule.
4646Anything you can express in an existing conditional rule
47- can be expressed in ''@if '' ,
47+ can be expressed in ''@when '' ,
4848it just has to be wrapped in an appropriate function
4949to declare what kind of condition it is.
5050This allow authors to easily combine multiple types of queries,
@@ -104,15 +104,15 @@ when the text and layout processing engine ingesting
104104this CSS text is capable of utilising the specified font-technology
105105in layout and rendering.
106106
107- <h2 id="if -rule">Generalized Conditional Rules: the ''@if '' rule</h2>
107+ <h2 id="when -rule">Generalized Conditional Rules: the ''@when '' rule</h2>
108108
109- The <dfn>@if </dfn> at-rule is a <a>conditional group rule</a>
109+ The <dfn>@when </dfn> at-rule is a <a>conditional group rule</a>
110110that generalizes the individual <a>conditional group rules</a>
111111such as ''@media'' and ''@supports'' .
112112It is defined as:
113113
114114<pre class=prod>
115- @if <<boolean-condition>> {
115+ @when <<boolean-condition>> {
116116 <<stylesheet>>
117117}
118118</pre>
@@ -160,7 +160,7 @@ It is defined as:
160160}
161161</pre>
162162
163- ''@else'' is interpreted identically to ''@if '' .
163+ ''@else'' is interpreted identically to ''@when '' .
164164If its <<boolean-condition>> is omitted,
165165it's treated as having a condition that's always true.
166166
@@ -189,7 +189,7 @@ An ''@else'' rule that is not part of a <a>conditional rule chain</a> is invalid
189189 For example, here's a (somewhat silly) conditional chain:
190190
191191 <pre class="lang-css">
192- @if media(width >= 400px) and media(pointer: fine) and supports(display: flex) {
192+ @when media(width >= 400px) and media(pointer: fine) and supports(display: flex) {
193193 /* A */
194194 } @else supports(caret-color: pink) and supports(background: double-rainbow()) {
195195 /* B */
@@ -252,7 +252,7 @@ An ''@else'' rule that is not part of a <a>conditional rule chain</a> is invalid
252252 so will always be chosen unless one of the earlier conditions succeeds.
253253
254254 <pre class="lang-css">
255- @if font-technology(color-COLRv1) and font-technology(variations) {
255+ @when font-technology(color-COLRv1) and font-technology(variations) {
256256 @font-face { font-family: icons; src: url(icons-gradient-var.woff2); }
257257 }
258258 @else font-technology(color-SVG) {
@@ -272,7 +272,7 @@ An ''@else'' rule that is not part of a <a>conditional rule chain</a> is invalid
272272 and font variations are also supported.
273273
274274 Notice too that only one of the available options will be downloaded;
275- this would not be the case without @if and @else,
275+ this would not be the case without ''@when'' and '' @else'' ,
276276 as the next example shows.
277277</div>
278278
@@ -306,7 +306,7 @@ No Security issues have been raised against this document
306306
307307<h2 class=no-num id="acknowledgments">Acknowledgments</h2>
308308
309- The @if and @else rules are based on a proposal by Tab Atkins.
309+ The @when and @else rules are based on a proposal by Tab Atkins.
310310
311311<h2 id='changes' class='no-num'>
312312 Changes</h2>
@@ -317,7 +317,7 @@ The @if and @else rules are based on a proposal by Tab Atkins.
317317
318318 <ul>
319319 <li> Added some examples</li>
320- <li> Added @if and @else per CSSWG resolution</li>
320+ <li> Added @when and @else per CSSWG resolution</li>
321321 <li> Extended @supports feature to express font capabilities</li>
322322 <li> Added two co-editors per CSSWG resolution</li>
323323 <li> Added Privacy and Security sections</li>
0 commit comments