Skip to content

Inline SVG element not adjusting to available width #15975

Closed
@ikondrasovas

Description

@ikondrasovas

The following inline SVG element is properly rendered into a regular bootstrap page:

<svg viewBox="0 0 3000 1500" preserveAspectRatio="xMidYMin slice" style="width: 100%; padding-bottom:calc(50%); height: 1px; overflow: visible"> <rect width="3000" height="1500" /> <line x1="0" y1="0" x2="3000" y2="1500" style="stroke:rgb(255,0,0);stroke-width:2" /> </svg>

However, when used into my Blazor project, the svg width is not properly adjusted to the available width.

There are some necessary workarounds to make this width adjustment works in most browsers and they usually work, but not with my Blazor project.

Is this something known that is related to Blazor? What should I do?

Thank you,

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions