Skip to content

SVG with interpolation doesn't render in browser #638

@deotimedev

Description

@deotimedev

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Run code:

use sycamore::prelude::*;

#[component]
fn Test<T: Html>() -> View<T> {
    view! {
        svg(width="100", height="100") {
            rect(width="100%", height="100%", fill="blue")
            (view! { rect(width="50%", height="50%", fill="red") })
        }
    }
}

fn main() {
    sycamore::render(Test);
}

Expected behavior
Interpolated to render the same as non-interpolated
image

Environment

  • Sycamore: 0.9.0-beta.1
  • Browser: Chrome
  • OS: Windows

Additional context
Interpolated and non-interpolated SVG results in identical DOM, so it seems strange that it does not show on screen

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-svgArea: SVG supportC-bugCategory: bug, something isn't workingS-actionableActionable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions