mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:17:36 +00:00

This allows positioning a child SVG relative to its parent SVG. Note: These have been implemented as CSS properties as in SVG 2, these are geometry properties that can be used in CSS (see https://www.w3.org/TR/SVG/geometry.html), but there is not much browser support for this. It is nicer to implement than the ad-hoc SVG attribute parsing though, so I feel it may make sense to port the rest of the attributes specified here (which should fix some issues with viewport relative sizes).
11 lines
343 B
HTML
11 lines
343 B
HTML
<svg xmlns="http://www.w3.org/2000/svg"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<svg x="10">
|
|
<rect x="10" y="10" height="100" width="100"
|
|
style="stroke:#ff0000; fill: #0000ff"/>
|
|
</svg>
|
|
<svg x="200" y="15">
|
|
<rect x="10" y="10" height="100" width="100"
|
|
style="stroke:#009900; fill: #00cc00"/>
|
|
</svg>
|
|
</svg>
|