Skip to content
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

feat: support prop casing for SVG attributes #5674

Open
3 tasks done
jcfranco opened this issue Apr 16, 2024 · 1 comment
Open
3 tasks done

feat: support prop casing for SVG attributes #5674

jcfranco opened this issue Apr 16, 2024 · 1 comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@jcfranco
Copy link
Contributor

Prerequisites

Describe the Feature Request

It'd be useful to support prop case for SVG attributes (similar to React).

Describe the Use Case

Spreading an object with props onto an SVG will not render properly and warnings/errors will be swallowed.

See repro case.

Describe Preferred Solution

SVG props get mapped to attributes.

In the following example, strokeWidth would be mapped and rendered as stroke-width

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 10">
  <circle cx={15} cy={5} r={3} stroke="green" strokeWidth={3} />
</svg>

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Apr 16, 2024
@christian-bromann christian-bromann self-assigned this Apr 16, 2024
@christian-bromann
Copy link
Member

Thank you @jcfranco for raising this issue.

I was able to reproduce it and will label it accordingly for this to be ingested into our backlog.

@christian-bromann christian-bromann added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Apr 16, 2024
@christian-bromann christian-bromann removed their assignment Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

No branches or pull requests

2 participants