Skip to content

Commit e143edf

Browse files
committed
[css-anchor-position] Define that env() flips its variable according to the try tactic. w3c#10422
1 parent 1dc494c commit e143edf

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

css-anchor-position-1/Overview.bs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,11 +1554,20 @@ Values have the following meanings:
15541554

15551555
2. [=substitute a var()|Substitute variables=],
15561556
''env()'' functions,
1557-
and similar substitution functions
1557+
and similar [=arbitrary substitution functions=]
15581558
in |styles|.
15591559

1560-
Issue: Need to define a term to hook for substitution functions,
1561-
to make sure we can hit var(), env(), random(), etc...
1560+
For ''env()'' functions,
1561+
if the referenced [=CSS/environment variable=] is associated with a direction or axis
1562+
(such as ''env()/safe-area-inset-top''),
1563+
switch the referenced [=CSS/environment variable=] corresponding to |directions|.
1564+
1565+
<div class=example>
1566+
For example, if ''top: env(safe-area-inset-top);'' is specified,
1567+
and |directions| are up and left,
1568+
the ''env()'' will resolve as if ''env(safe-area-inset-left)'' had been specified instead.
1569+
(And then, in the next step, will actually swap into the 'left' property.)
1570+
</div>
15621571

15631572
3. Swap the values of the |styles| between
15641573
the associated properties

css-env-1/Overview.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ with a syntax like <code>values[0]</code>.
6666
Environment Variables {#environment}
6767
====================================
6868

69-
A CSS <dfn for=CSS>environment variable</dfn> is a name associated with a <<declaration-value>>
69+
A CSS <dfn export for=CSS>environment variable</dfn> is a name associated with a <<declaration-value>>
7070
(a sequence of zero more CSS tokens, with almost no restrictions on what tokens can exist),
7171
similar to a [=custom property=].
7272
[=Environment variables=] can be defined by the user agent,

css-variables-1/Overview.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ Using Cascading Variables: the ''var()'' notation</h2>
858858
<h2 id=arbitrary-substitution>
859859
Arbitrary Substitution Functions</h2>
860860

861-
An <dfn>arbitrary substitution function</dfn>
861+
An <dfn export>arbitrary substitution function</dfn>
862862
is a function that will,
863863
when resolved,
864864
substitute itself with other content

0 commit comments

Comments
 (0)