Skip to content

Commit acb1257

Browse files
committed
[css-linke-params] Remove mentions of scoped environment vars.
1 parent 9ff88b0 commit acb1257

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

css-link-params-1/Overview.bs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ as in a URL's query parameters.
186186
<div class="example">
187187
For example, if the image from the previous example also used ''env(--bg-color)'',
188188
it could be referenced with a url like
189-
<code>http://example.com/image.svg#param(--text-color,blue)&param(--bg-color,white)</code>
189+
<code>http://example.com/image.svg#param(--text-color,blue)&amp;param(--bg-color,white)</code>
190190
to set both ''env(--text-color)'' and ''env(--bg-color)''.
191191
</div>
192192

@@ -262,31 +262,23 @@ accessible with the ''env()'' function in stylesheets.
262262
1. On each ''env()'' function, provide a fallback value, like ''fill: env(--color, blue)''.
263263
2. If the ''env()'' is going to be used a lot,
264264
such that providing a fallback for each individual ''env()'' is troublesome,
265-
store the [=custom environment variable=] in a [=scoped environment variable=]
266-
of a different name,
265+
store the [=custom environment variable=] in a [=custom property=] on the root element
267266
with the default specified,
268267
like:
269268

270269
<pre class="lang-css">
271-
@env --color2: env(--color, blue);
272-
273-
/* Alternately, store it in a custom property: */
274270
:root {
275271
--color: env(--color, blue);
276272
}
277273
</pre>
278274

279275
In this example, if ''--color'' is provided via a [=linked parameter=],
280-
''env(--color2)'' will contain its value.
276+
''var(--color)'' will contain its value.
281277
If not, it will contain the default ''blue'' value.
282-
In either case, ''env(--color2)'' can be used in the stylesheet unconditionally,
278+
In either case, ''var(--color)'' can be used in the stylesheet unconditionally,
283279
secure in the knowledge that it will always have a value.
284280
</div>
285281

286-
Note: When we define ''env(parent --color)'' to jump up a scope level,
287-
you won't need to do the rename;
288-
''@env --color: env(parent --color);'' will work just fine.
289-
290282

291283
<h2 class="no-num no-ref" id=priv>
292284
Privacy Considerations</h2>

0 commit comments

Comments
 (0)