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

The deprecated xlink:href attribute should be replaced with href #208

Open
yudai-nkt opened this issue Feb 25, 2024 · 0 comments
Open

The deprecated xlink:href attribute should be replaced with href #208

yudai-nkt opened this issue Feb 25, 2024 · 0 comments

Comments

@yudai-nkt
Copy link

What version of astro-icon are you using?

v1.1.0

Astro Info

Astro                    v4.4.4
Node                     v18.18.0
System                   macOS (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             astro-expressive-code
                         astro-icon
                         @astrojs/sitemap

If this issue only occurs in one browser, which browser is a problem?

N/A

Describe the Bug

Astro Icon uses the deprecated xlink:href attribute and it gives me linting errors.

<Fragment>
{includeSymbol && <symbol id={id} set:html={normalizedBody} />}
<use xlink:href={`#${id}`} />
</Fragment>

Below is an excerpt from the relevant part of SVG spec:

In previous versions of SVG, the ‘href’ attribute was specified in the XLink namespace [xlink] namespace. This usage is now deprecated and instead URL references should be specified using the ‘href’ attribute without a namespace.

What's the expected result?

The href attribute should be used instead.

I can submit a PR, but would you think this is a breaking change although icon visuals remain the same? If you do, I'd like to discuss how we keep compatibility before working on the fix.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-vgk3vl?file=src%2Fpages%2Findex.astro

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

1 participant