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

cannot parse colors in style class #492

Closed
szuwest opened this issue Oct 23, 2018 · 1 comment
Closed

cannot parse colors in style class #492

szuwest opened this issue Oct 23, 2018 · 1 comment
Assignees
Milestone

Comments

@szuwest
Copy link

szuwest commented Oct 23, 2018

I hava a svg file like this:

<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><defs><style>.cls-1{fill:#ff9595;}.cls-2{fill:#ffcc80;}</style></defs><title>彩色图标</title><path class="cls-1" d="M43,77A27.14,27.14,0,0,0,58.64,27.67a24.55,24.55,0,0,1-6.4,8A24.44,24.44,0,0,0,34.55,3a24.48,24.48,0,0,1,.87,6.49c0,21.19-25.57,21.72-25.57,42.37C9.85,64.9,20.47,77,43,77Z"/><path class="cls-2" d="M51,66c0-9.28-11.79-11.85-11.79-21.74A12.3,12.3,0,0,1,40,39.95,20.79,20.79,0,0,0,34.77,76.4,54.34,54.34,0,0,0,43,77c.86,0,1.7,0,2.53-.12A13.47,13.47,0,0,0,51,66Z"/></svg>

Maccaw cannot parse the fill colors.
Can you support it?
Thanks.

@ystrot ystrot closed this as completed in 978a0ca Oct 23, 2018
@ystrot ystrot self-assigned this Oct 23, 2018
@ystrot
Copy link
Member

ystrot commented Oct 23, 2018

Hi szuwest! Actually <style> tag should be defined right in the <svg>, not inside <defs> section. However other SVG renderers allowing it, so we also added such a feature. Please use version from the master branch.

@ystrot ystrot added this to the 0.9.4 milestone Oct 23, 2018
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

2 participants