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

SVG Sprite CSS generation issue

yamsoft opened this issue · comments

Hi...
Just wanted to ask if it is possible to get the pixel position of an individual svg icon from the generated sprite?

Please specify what you mean with "get" the pixel position. At which stage, using which technology? During the generation of the sprite (Mustache template rendering) the absolute positions are available as template variables (please see the templating documentation for details). After the sprite is generated, it is up to you to parse / examine the sprite and extract the positions with a technology of your choice. It's out of svg-sprite's scope then.