Skip to content

使用 href 替换 xlink:href #13513

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

Closed
TCOTC opened this issue Dec 17, 2024 · 8 comments
Closed

使用 href 替换 xlink:href #13513

TCOTC opened this issue Dec 17, 2024 · 8 comments
Assignees

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Dec 17, 2024

尝试 https://ld246.com/article/1734427196426 的时候发现选择器选不到 [xlink:href="#iconListItem"] 的元素,然后查到 xlink:href 已弃用:https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

@wish5115
Copy link

wish5115 commented Dec 17, 2024

这一替换估计会倒下一小片插件和代码片段😁。

@TCOTC
Copy link
Contributor Author

TCOTC commented Dec 17, 2024

主题和代码片段应该不影响,选择器选不中。有什么插件会需要用这个吗?

@cordinGH
Copy link

Screenshot_2024-12-18-02-32-44-902_com.android.browser-edit.jpg

也可以和mdn提到的那样,两个一起写。

@wish5115
Copy link

wish5115 commented Dec 18, 2024

主题和代码片段应该不影响,选择器选不中。有什么插件会需要用这个吗?

嗯呢,主题不受影响

有什么插件,不清楚,猜的,应该有一小部分用到吧,一般不多,我记得你有个js代码片段就有用到这个,我也用过这个做过一些判断。

不过如果按楼上说的做下兼容就没影响了。

@TCOTC
Copy link
Contributor Author

TCOTC commented Dec 18, 2024

用这个可以了,那就不动了:https://ld246.com/article/1734427196426/comment/1734486397365#comments

@namespace xlink 'http://www.w3.org/1999/xlink';

.protyle-breadcrumb__item:has(use[xlink|href*=iconListItem]) .protyle-breadcrumb__text {
    display: none;
}

@TCOTC TCOTC closed this as completed Dec 18, 2024
@wish5115
Copy link

wish5115 commented Dec 18, 2024

用这个可以了,那就不动了:https://ld246.com/article/1734427196426/comment/1734486397365#comments

@namespace xlink 'http://www.w3.org/1999/xlink';

.protyle-breadcrumb__item:has(use[xlink|href*=iconListItem]) .protyle-breadcrumb__text {
    display: none;
}

被弃用了,早晚得改,且加一个属性的事,而且对旧版本没影响,又支持新版本,何乐而不为呢

@TCOTC
Copy link
Contributor Author

TCOTC commented Dec 18, 2024

两个一起写

这个应该会有冲突,要改的话得直接换

@wish5115
Copy link

两个一起写

这个应该会有冲突,要改的话得直接换

好吧,没研究过

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

4 participants