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

fix: tref only works with xlink:href #30364

Merged
merged 1 commit into from
Nov 18, 2023
Merged

fix: tref only works with xlink:href #30364

merged 1 commit into from
Nov 18, 2023

Conversation

SethFalco
Copy link
Contributor

@SethFalco SethFalco commented Nov 18, 2023

Description

Some elements, namely <cursor>, <filter>, <font-face-uri>, <glyphRef>, and <tref> only work with xlink:href, and not href.

The example was incorrectly using href which clients, including ones that support SVG 2, will not render. I tested this in Eye of GNOME (GNOME's default image viewer.)

Motivation

The SVG will now render correctly in viewers.

Additional details

Compare the list of nodes that support XLink's href to the SVG 2 href:

Nodes that are deprecated/removed in SVG 2 do not support the SVG 2 href attribute, so xlink:href must still be used.

I was investigating this following this comment in SVGO:

Related issues and pull requests

@SethFalco SethFalco requested review from a team and Ryuno-Ki and removed request for a team November 18, 2023 15:18
@github-actions github-actions bot added the Content:SVG SVG docs label Nov 18, 2023
Copy link
Contributor

Preview URLs

Copy link
Collaborator

@Ryuno-Ki Ryuno-Ki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See SVGO link in the OP for reference

@Ryuno-Ki Ryuno-Ki merged commit a82473b into mdn:main Nov 18, 2023
6 checks passed
@Ryuno-Ki
Copy link
Collaborator

Thank you. Also, congratulations on your first merged MDN content PR. Welcome to he team!

@SethFalco SethFalco deleted the patch-1 branch November 18, 2023 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:SVG SVG docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants