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

Invalid HTML attributes rendered using Astro + Preact #268

Open
5 tasks done
moritzlang opened this issue Feb 15, 2023 · 1 comment
Open
5 tasks done

Invalid HTML attributes rendered using Astro + Preact #268

moritzlang opened this issue Feb 15, 2023 · 1 comment

Comments

@moritzlang
Copy link

Describe the bug

Hey!

I encountered a problem when rendering an icon in a Preact component using Astro.
In the StackBlitz project you can see that the rendered SVG contains attributes in camel-case (strokeWidth instead of stroke-width), which causes a visual bug since the HTML is not valid.

Any idea on how to fix this?

Thanks for your help!
Moritz

Reproduction

https://stackblitz.com/edit/github-wpq4zq?file=astro.config.mjs

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@moritzlang moritzlang changed the title Rendering invalid HTML attributes using Astro + Preact Invalid HTML attributes rendered using Astro + Preact Feb 15, 2023
@userquin
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants