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

svgo converts black (#000000) to fill:none #115

Closed
fmal opened this issue May 10, 2013 · 3 comments
Closed

svgo converts black (#000000) to fill:none #115

fmal opened this issue May 10, 2013 · 3 comments
Assignees
Labels

Comments

@fmal
Copy link

fmal commented May 10, 2013

I have an svg file with some monochromatic symbol.

Original file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="512px" height="512px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
    <title>test</title>
    <description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
    <defs></defs>
    <g id="Page 1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M256,384 C344.365564,384 416,312.365564 416,224 C416,135.634436 344.365564,64 256,64 C167.634436,64 96,135.634436 96,224 C96,312.365564 167.634436,384 256,384 Z M256,384" id="Oval 1" fill="#000000"></path>
    </g>
</svg>

After converting with SVGO using command line svgo -i ~/Desktop/svgs/test.svg -o ~/Desktop/svgs/test-opt.svg i get this:

<svg width="512" height="512" xmlns="http://www.w3.org/2000/svg"><title>test</title><path d="M256 384c88.366 0 160-71.634 160-160s-71.634-160-160-160-160 71.634-160 160 71.634 160 160 160zm0 0" fill="none"/></svg>

You can see that the fill="#000000" was converted to fill="none". Because of this i can't see the shape when viewing the converted file. Is that some kind of a bug or is it intended?

@ghost ghost assigned deepsweet May 10, 2013
@sambowler
Copy link

I'm also seeing this issue. Although not ideal, converting the fill to "#00000.1" (minus the period) temporarily fixes the problem.

@manovotny
Copy link

+1 for fixing this!

I have some black icons that would love to be seen.

@GreLI
Copy link
Member

GreLI commented Jan 19, 2015

Apparently, it was fixed eventually.

@GreLI GreLI closed this as completed Jan 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants