svg-sprite / grunt-svg-sprite

SVG sprites & stacks galore — Grunt plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours

Home Page:https://github.com/svg-sprite/svg-sprite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Background-position porcentually?

davidpelayo opened this issue · comments

I'm wondering whether it would be nice to have a computed porcentual background-position instead of static pixeled one.

Why? Mainly because when you want to import the SVG as your main sprite and then resizing the div that will have the class pointing to the icon, you will probably want to resize the icon too. Meaning we need porcentual units in regard background positions to continue pointing to the icon once the container is getting bigger or smaller.

Hi @davidpelayo,

I just published the next major release of grunt-svg-sprite. It's rewritten from scratch and now featuring relative background positioning for CSS sprites — could you please check this? I'll close the issue for now, but please feel free to re-open it in case you've still got problems.

Cheers & a happy new year,
Joschi