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

Update Sprite styles #59

Closed
rayfranco opened this issue Oct 6, 2016 · 0 comments
Closed

Update Sprite styles #59

rayfranco opened this issue Oct 6, 2016 · 0 comments

Comments

@rayfranco
Copy link
Contributor

rayfranco commented Oct 6, 2016

I am not sure why you chose visibility:hidden over display: none in the styles but this is not working with my configuration.

Instead of breaking this on everyone's configuration, I suggest to change Sprite.spriteTemplate to a function so we can easily update Sprite.styles in our implementation.

This is an example of what we could do:

var Sprite = require('svg-sprite-loader/lib/web/sprite')

// Replace visibility:hidden by display:none
Sprite.styles.pop()
Sprite.styles.push('display:none')

var globalSprite = new Sprite()

// ...

module.exports = globalSprite

If you think a PR is necessary just let me know.

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