ant-design / ant-design/html2sketch

🐛[BUG] 背景图片为 SVG 并且是用 use 的方式来引用路径的不能正确解析颜色

Open
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
179
Forks
27
PR merge metrics
No merged PRs in 30d

Description

### 🐛 bug 描述

背景图片为 SVG 并且是用 use 的方式来引用路径的不能正确解析颜色
### 📷 复现步骤

html 元素使用 background-image 引入背景图片为 SVG 并且是用 use 的方式来引用路径的,不能正常把颜色渲染出来

![](https://user-images.githubusercontent.com/1013557/94220146-ee45b600-ff1a-11ea-9c77-f575eaf2b47e.png)

### 🏞 期望结果

可以正确渲染颜色

### 💻 复现代码

https://codepen.io/janily/pen/WNwPBNw

### © 版本信息

- html2sketch 版本: [0.4.1]
- 浏览器环境 Chrome
- 开发环境 [e.g. mac OS] Mac

### 🚑 其他信息

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked CodePen reproduction and compare its SVG background image behavior with html2sketch version 0.4.1 in Chrome on macOS. Trace how SVG backgrounds using references are parsed and confirm that the referenced paths retain their colors when the issue is fixed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.