Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.

Using stroke to color is overreaching #6

Closed
jefflembeck opened this issue Jul 1, 2014 · 5 comments
Closed

Using stroke to color is overreaching #6

jefflembeck opened this issue Jul 1, 2014 · 5 comments
Labels

Comments

@jefflembeck
Copy link
Collaborator

See: filamentgroup/grunticon#161

@jefflembeck jefflembeck added the bug label Jul 1, 2014
@tkadlec
Copy link
Contributor

tkadlec commented Jul 17, 2014

I came across this as well and was hoping to help out.

Killing the stroke certainly fixes the issue, but then I suppose any icon with a stroke in place isn't going to be magically colorized. Simple as a regex to see if a stroke is being applied and using that to determine whether or not to style the stroke?

@jefflembeck
Copy link
Collaborator Author

@tkadlec yeah, that should be a decent enough solution. Trying to see what I can do about this today.

@chapati23
Copy link

my fix for the moment is to use grunt-string-replace with the config below. this just parses all my inline-svgs and removes the stroke-attributes. not superclean but works for me.

# Replaces strings in files
module.exports =
    dist:
        files:
            '<%= build_dir %>/assets/icons/icons.data.svg.css': '<%= build_dir %>/assets/icons/icons.data.svg.css'
        options:
            replacements: [{
                pattern: /stroke(.*?)%3B%20/g
                replacement: ''
            }]

@jefflembeck
Copy link
Collaborator Author

@pshizzle @tkadlec so, at the moment, the issue seems to lie in that you can fix your problem by not having a stroke on the svg in the first place.

That's a bit worrisome, as the reason we color the stroke at all is that it was expected to be colored in other cases. :/

@jefflembeck
Copy link
Collaborator Author

Fixed using @tkadlec's suggestion. Hopefully that does the trick 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants