File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1421,16 +1421,26 @@ in any other context it's invalid and ignored.
14211421Its grammar is:
14221422
14231423<pre class=prod>
1424- <<@env>> = @env <<custom-property-name>> : <<declaration-value>> ? ;
1424+ <<@env>> = @env <<custom-property-name>> <<css-type>> ? : <<declaration-value>> ? ;
14251425</pre>
14261426
14271427This defines a [=scoped environment variable=]
14281428with a name given by the <<custom-property-name>> ,
1429+ optionally a type given by <<css-type>> ,
14291430and a value given by the <css> <<declaration-value>> ?</css> .
14301431Its scope is the rule it's nested in,
14311432or the stylesheet it's defined in
14321433if it's not nested.
14331434
1435+ If a <<css-type>> is given,
1436+ then when an ''env()'' referencing this [=scoped environment variable=]
1437+ is [=replace an arbitrary substitution function|replaced=] ,
1438+ the value must [=CSS/parse=] according to the <<css-type>> ,
1439+ or else the ''env()'' is replaced by the [=guaranteed-invalid value=] .
1440+ If it successfully parses,
1441+ the value has the specified type.
1442+
1443+
14341444<h4 id=using-scoped-env>
14351445Using Scoped Environment Variables</h4>
14361446
You can’t perform that action at this time.
0 commit comments