Skip to content

Commit 83dbaa7

Browse files
committed
[css-values-5] Define if() processing, add a note. w3c#10064
1 parent 873c0fd commit 83dbaa7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

css-values-5/Overview.bs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,18 @@ Conditional Value Selection: the ''if()'' notation</h3>
13431343
The <dfn value for="if()">else</dfn> keyword represents
13441344
a condition that is always true.
13451345

1346+
To <dfn export>[=resolve an arbitrary substitution function|resolve an if() function=]</dfn>,
1347+
return the <<declaration-value>>?
1348+
associated with the first <<if-condition>> that is true;
1349+
if none are true,
1350+
return nothing (an empty token stream).
1351+
1352+
Note: Unlike using ''@media''/''@supports''/''@container'' rules,
1353+
which just ignore their contents when they're false
1354+
and let the cascade determine what values otherwise apply,
1355+
declarations with ''if()'' do not roll back the cascade if the conditions are false;
1356+
any fallback values must be provided inline.
1357+
13461358
<!-- Big Text: toggle()
13471359

13481360
█████▌ ███▌ ███▌ ███▌ █▌ █████▌ ██ ██

0 commit comments

Comments
 (0)