blob: 9267fb427a9ee59628226d274a026e712cb350ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="50">
<style type="text/css">
/* Elements should appear in red-green-blue-yellow order.
The :lang(en) should match en-US. It will also match en-GB,
but that gets overridden later. */
:lang(en, cn) { fill: red }
/* Languages should be inherited from their parent elements. */
:lang(es) { fill: green }
/* Child languages should override the parent ones. */
:lang(it) { fill: blue }
/* Language inheritence should walk more than one level of the DOM.
en-GB should match en-GB, but not en-US. */
:lang(en-GB) { fill: yellow }
/* a rect with no lang attribute should default to black */
svg { fill: black }
</style>
<rect xml:lang="en-US" x="0" y="0" width="10" height="10" />
<g xml:lang="es"><rect x="0" y="10" width="10" height="10" /></g>
<g xml:lang="es"><rect xml:lang="it" x="0" y="20" width="10" height="10" /></g>
<g xml:lang="en-GB"><g><rect x="0" y="30" width="10" height="10" /></g></g>
<rect x="0" y="40" width="10" height="10"/>
</svg>
|