From f70deb43d3fec5985470e20f948c8f80da52242a Mon Sep 17 00:00:00 2001 From: fantasai Date: Fri, 25 Oct 2024 17:05:47 -0400 Subject: [PATCH] [css-values-5] Define if() notation #10064 #5624 #5009 #6638 #4731 #3455 --- css-values-5/Overview.bs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/css-values-5/Overview.bs b/css-values-5/Overview.bs index de571dfd924..1a061445aea 100644 --- a/css-values-5/Overview.bs +++ b/css-values-5/Overview.bs @@ -1242,6 +1242,40 @@ Selecting the First Supported Value: the ''first-valid()'' notation <> imposes no contextual validity constraints on what it matches, unlike <>. + + +

+Conditional Value Selection: the ''if()'' notation

+ + The if() notation is an [=arbitrary substitution function=] + that represents conditional values. + Its argument consists of an ordered semi-colon–separated list of statements, + each consisting of a condition + followed by a colon + followed by the value represented by this notation + if the corresponding condition is the first in the list to be true. + If no condition matches, + then the ''if()'' notation represents an empty token stream. + + Note: [=Arbitrary substitution functions=] all resolve at [=computed value=] time; + therefore if the resulting property value is invalid, + it falls back to the property's [=initial value=] + rather than to an earlier value in the [=cascade=]. + + The ''if()'' notation syntax is defined as follows: + +
+	<> = if( [ <> : <>? ; ]*
+	             <> : <>? ;? )
+	<> =
+	  supports( [  |  ] ) |
+	  media( <> ) |
+	  style( <> ) |
+	  else
+	
+ + ISSUE: Incorporate boolean syntax for combining these queries.