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.
1421
1421
Its grammar is:
1422
1422
1423
1423
<pre class=prod>
1424
- <<@env>> = @env <<custom-property-name>> : <<declaration-value>> ? ;
1424
+ <<@env>> = @env <<custom-property-name>> <<css-type>> ? : <<declaration-value>> ? ;
1425
1425
</pre>
1426
1426
1427
1427
This defines a [=scoped environment variable=]
1428
1428
with a name given by the <<custom-property-name>> ,
1429
+ optionally a type given by <<css-type>> ,
1429
1430
and a value given by the <css> <<declaration-value>> ?</css> .
1430
1431
Its scope is the rule it's nested in,
1431
1432
or the stylesheet it's defined in
1432
1433
if it's not nested.
1433
1434
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
+
1434
1444
<h4 id=using-scoped-env>
1435
1445
Using Scoped Environment Variables</h4>
1436
1446
You can’t perform that action at this time.
0 commit comments