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 "<use xlink:href>" code in the icon-link examples do not work #39499

Closed
3 tasks done
rob-stoecklein opened this issue Dec 15, 2023 · 4 comments · May be fixed by #39799
Closed
3 tasks done

The "<use xlink:href>" code in the icon-link examples do not work #39499

rob-stoecklein opened this issue Dec 15, 2023 · 4 comments · May be fixed by #39799

Comments

@rob-stoecklein
Copy link

Prerequisites

Describe the issue

Some StackBlitz examples on the https://getbootstrap.com/docs/5.3/helpers/icon-link/ page do not work.

Reduced test cases

  1. Go to the given Bootstrap page (see above)
  2. Click on any of the StackBlitz links that display an associated icon along with the text link
  3. On the StackBlitz page, the icon does NOT appear

This perhaps is related to #36146,
which refers to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href, which says that xlink:href is deprecated.
This page suggests replacing xlink:href with href, but that change does not show the icon either.

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome, Firefox, Microsoft Edge

What version of Bootstrap are you using?

5.3.2

@rob-stoecklein
Copy link
Author

Here's the image I forgot to post in the original:

StackBlitz

@WOLFRIEND
Copy link

I've noticed that this happens due to the absence of the <svg/> element on StackBlitz. If you'll open the documentation page, inspect it, found this <svg/> element, copy and paste it to StackBlitz, everything will work.
Screenshot 2023-12-16 at 11 59 41

@julien-deramond
Copy link
Member

As said by @WOLFRIEND, this is because the <svg> containing the images is not transferred to StackBlitz. We'll look at how to do it without complexifying the system that does everything around this feature. Thanks for reporting it @rob-stoecklein.

@rob-stoecklein
Copy link
Author

Thank you so much!

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