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

CSS fill or SVG fill attribute is not applied #4

Open
mrosalesdiaz opened this issue Nov 27, 2018 · 0 comments
Open

CSS fill or SVG fill attribute is not applied #4

mrosalesdiaz opened this issue Nov 27, 2018 · 0 comments

Comments

@mrosalesdiaz
Copy link

mrosalesdiaz commented Nov 27, 2018

Color is not being set when try to apply neither css or attribute.

<svg xmlns="http://www.w3.org/2000/svg">
    <use style="fill: red !important;" fill="red" xlink:href="sprite.svg#si-glyph-bubble-message-hi" />
</svg>

I think it is caused because it has been set in the SVG file, in attribute fill in tag g and path. Children attributes are not overriden by fill in parent svg and also it cannot be modified cause en use tag use it is loaded as shadow dom closed that cant be modified with javascript.


<symbol id="si-glyph-bubble-message-hi" viewBox="0 0 17 16">
    <!-- Generator: Sketch 3.0.3 (7891) - http://www.bohemiancoding.com/sketch -->
    <title>1036</title>
    
    <defs/>
    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="{..}" fill="#434343" class="si-glyph-fill"/>
    </g>

</symbol>

Is there another way to solve this? rather than modify the sprite.svg

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

1 participant