Skip to content

Commit

Permalink
[css-values-5] Define if() processing, add a note. #10064
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Oct 28, 2024
1 parent 873c0fd commit 83dbaa7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions css-values-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,18 @@ Conditional Value Selection: the ''if()'' notation</h3>
The <dfn value for="if()">else</dfn> keyword represents
a condition that is always true.

To <dfn export>[=resolve an arbitrary substitution function|resolve an if() function=]</dfn>,
return the <<declaration-value>>?
associated with the first <<if-condition>> that is true;
if none are true,
return nothing (an empty token stream).

Note: Unlike using ''@media''/''@supports''/''@container'' rules,
which just ignore their contents when they're false
and let the cascade determine what values otherwise apply,
declarations with ''if()'' do not roll back the cascade if the conditions are false;
any fallback values must be provided inline.

<!-- Big Text: toggle()

█████▌ ███▌ ███▌ ███▌ █▌ █████▌ ██ ██
Expand Down

0 comments on commit 83dbaa7

Please sign in to comment.