Skip to content

bug: SVG's viewBox is set to lowercase (again) #3717

@mikaelkaron

Description

@mikaelkaron

Prerequisites

Stencil Version

2.18.1

Current Behavior

svg attribute viewBox is converted to lowercase if generated inside a functional component

Expected Behavior

viewBox to not render as viewbox

Steps to Reproduce

export const SvgTest: FunctionalComponent<any> = () => {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      viewBox='0 0 24 24'
    >
    </svg>
  )
}

when rendered will result in

<svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 24 24'></svg>

Code Reproduction URL

n/a

Additional Information

there's a previous issue (#1847) that illustrates the problem. This looks to be a regression since then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within Stencil

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions