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

IconService changes fill property of svg #536

Closed
drilko opened this issue Aug 28, 2022 · 1 comment · Fixed by #670 or ant-design/ant-design#50880
Closed

IconService changes fill property of svg #536

drilko opened this issue Aug 28, 2022 · 1 comment · Fixed by #670 or ant-design/ant-design#50880

Comments

@drilko
Copy link

drilko commented Aug 28, 2022

Hello,
I have this svg:
<svg width="15" height="15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.288 2.25L3.156 7.681a1.906 1.906 0 00-.418.894L2.506 10.6c-.08.731.444 1.231 1.17 1.106l2.012-.343c.28-.05.675-.257.868-.47l5.132-5.43c.887-.938 1.287-2.007-.094-3.313-1.375-1.294-2.419-.837-3.306.1zM7.431 3.156a3.829 3.829 0 003.406 3.219M1.875 13.75h11.25" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>

When I load it by using namespace load, its fill property get replaced with currentColor which messes up the svg (it get fully black).

Is there any reason why IconService is doing this on custom svgs?

@ilxqx
Copy link

ilxqx commented Sep 15, 2024

同样的问题,为什么自定义图标要添加一个 fill 为 currentColor 属性呢?
我的图标渲染会有问题:
image
错误的渲染:
image

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