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

svg use elements are not show in firefox #88

Open
nidi3 opened this issue May 14, 2024 · 3 comments
Open

svg use elements are not show in firefox #88

nidi3 opened this issue May 14, 2024 · 3 comments

Comments

@nidi3
Copy link

nidi3 commented May 14, 2024

https://jsfiddle.net/7hsnzrpa/1/

In Chrome, the circle is visible, in Firefox not. (MacOS)

@graymatter00
Copy link

Tested the jsfiddle sample on Windows and Android: Works fine in Chrome and Edge. Produced the same issue with Firefox.

Removing the reference to css-reset fixes the issue. I dug around but can't find the cause.

@fabulousgk
Copy link
Contributor

fabulousgk commented May 15, 2024 via email

@graymatter00
Copy link

graymatter00 commented May 15, 2024

Not a solution, but a workaround using symbol instead of defs...

<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/reset.css" />
<svg hidden>
  <symbol id="my-symbol">
    <circle cx="10" cy="10" r="5" />
  </symbol>
</svg>

<svg>
  <use href="#my-symbol" />
</svg>

This seems to work fine in Firefox on Windows.

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

3 participants