mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
LibWeb: Use viewbox attribute in SVG symbol element
Previously when a viewBox was passed to a SVG symbol element it would not be taken into account when drawing the SVG.
This commit is contained in:
parent
9f73fc87a8
commit
e61fdd1dc6
9 changed files with 67 additions and 4 deletions
13
Tests/LibWeb/Layout/input/svg/svg-symbol-with-viewbox.html
Normal file
13
Tests/LibWeb/Layout/input/svg/svg-symbol-with-viewbox.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<body>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="braces" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M2.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C3.25 2 2.49 2.759 2.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6zM13.886 7.9v.163c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456V7.332c-1.114 0-1.49-.362-1.49-1.456V4.352C13.51 2.759 12.75 2 11.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6z">
|
||||
</path>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<div>
|
||||
<svg>
|
||||
<use xlink:href="#braces"></use>
|
||||
</svg>
|
Loading…
Add table
Add a link
Reference in a new issue