We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c5e24c commit e6e2164Copy full SHA for e6e2164
1 file changed
css-variables/Overview.bs
@@ -240,6 +240,24 @@ Custom Property Value Syntax</h3>
240
</pre>
241
</div>
242
243
+ <div class='example'>
244
+ A real-world example of <a>custom property</a> usage
245
+ is easily separating out strings from where they're used,
246
+ to aid in maintenance of internationalization:
247
+
248
+ <pre class='lang-css'>
249
+ :root,
250
+ :root:lang(en) {--external-link: "external link";}
251
+ :root:lang(de) {--external-link: "externer Link";}
252
253
+ a[href^="http"]::after {content: " (" var(--external-link) ")"}
254
+ </pre>
255
256
+ The variable declarations can even be kept in a separate file,
257
+ to make maintaining the translations simpler.
258
+ </div>
259
260
261
262
<h3 id='cycles'>
263
Resolving Dependency Cycles</h3>
0 commit comments