Skip to content

SVG: .viewBox renders as 'viewbox' but should be 'viewBox' #34

@mynona

Description

@mynona

This code

SVG {
            for path in paths {
                Path(path)
            }
        }
        .viewBox(minX: 0, minY: 0, width: 16, height: 16)

renders as

<svg viewbox="0 0 16 16" role="presentation" preserveaspectratio="xMinYMin meet" fill="currentColor" (some things left out)>
                    <path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z"></path>
                </svg>

viewBox in SVG is case sensitive.
Therfore, it should be 'viewBox' and not 'viewbox'

Same for 'preserveAspectRatio="xMinYMin meet"'
Also doesnt use the correct case sensitive value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions