Skip to content

Commit 83dbaa7

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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
13431343
The else keyword represents
13441344
a condition that is always true.
13451345

1346+
To [=resolve an arbitrary substitution function|resolve an if() function=],
1347+
return the <>?
1348+
associated with the first <> 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
commit comments
Comments
 (0)