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

Convert SVG to use inline styles #308

Open
insinfo opened this issue Mar 8, 2023 · 1 comment
Open

Convert SVG to use inline styles #308

insinfo opened this issue Mar 8, 2023 · 1 comment

Comments

@insinfo
Copy link

insinfo commented Mar 8, 2023

How can I convert an SVG to use inline styles ? For example, I want to convert this:

<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 576 576">
 <defs>
  <style>.cls-1{fill:#d1b037;stroke:#1e1e1e;stroke-width:0.25px;}</style>
 </defs>
 <rect class="cls-1" width="576" height="576"/>
</svg>

to

<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 576 576">
 <rect class="cls-1" width="576" height="576" fill='#d1b037' stroke='#1e1e1e' stroke-width='0.25px'/>
</svg>
@JoKalliauer
Copy link

JoKalliauer commented Mar 8, 2023

That's not possible in scour see #174 , however you could use e.g. svgcleaner.

If you don't want to install it you can try https://svgworkaroundbot.toolforge.org/ and activate "run svgcleaner".

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