-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG @html element not rentering from string #7450
Comments
When I open dev tools I see the element appearing in the Elements view, not sure what this hints at. |
I think the reason is that the namespace is not svg. |
It works if it's the only thing in the <svg width="{width}" height="{height}">
{@html circle}
</svg> It does not if there is another element <svg width="{width}" height="{height}">
{@html circle}
<circle cx="{width/4*3}" cy="{height/2}" r="24" fill="#118AB2"/>
</svg> That one looks like <svg width="{width}" height="{height}">
<circle cx="{width/4*3}" cy="{height/2}" r="24" fill="#118AB2"/>
</svg> but in the inspector I can see 2 elements for the example with 2 circles. |
Yep
|
related issue: #7002 |
I documented a workaround at #5764 (comment) |
This should be fixed now in 3.48.0 - https://svelte.dev/repl/39625f96ce6941f8b7ca41f7e43738a7?version=3.48.0 |
Describe the bug
When composing a svg from a string, elements are not rendered.
In the example both circles look the same in the DOM (with a different position and color). The element from the string only renders if no other element is in the svg. If it is alone, it works.
Reproduction
https://svelte.dev/repl/39625f96ce6941f8b7ca41f7e43738a7?version=3.47.0
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: