Comments (13)
If you are using the :horizontal or :vertical layout options, then there is also an (optional) :padding option you can use.
Unfortunately its not supported when using the :packed layout option. I'll look into adding that in a future release.
Thanks
from sprite-factory.
when I using padding, all image size are bigger, I need a margin..
from sprite-factory.
Oops, sorry, my mistake. You're right, you need a margin option, not padding - to give the image more room in the spritesheet, but not in the x,y,w,h coords generated for the css.
I'll try to add that in the next release
from sprite-factory.
Yep, that's exactly as @halida said. But I think you've already got that :)
from sprite-factory.
FYI: I've merged in @halida's pull request (Thanks!) into the master branch to add the new :margin option to the :horizontal and :vertical layout.
I'll see if I can get some time this weekend to also support padding/margin in the :packed layout and then see about releasing a minor update to the gem itself.
from sprite-factory.
Hi Jake,
Great news ! Looking forward to having this on :packed layout ;)
Thx
from sprite-factory.
Ok. It's done (on master branch). You can now specify :margin => 1
for any of the layout formats.
I probably won't publish a new gem version for a little while, I'll try to accumulate a few more fixes before publishing, if that's a problem let me know - I can be persuaded to change my mind!
from sprite-factory.
It works great, thanks !
from sprite-factory.
Does your comment mean that you won't push this change to rubygem ? I think it's really a great improvement since it prevents zooming from having a very bad effect :(
I'm using your gem on production and I dislike using :git => ...
in my Gemfile, it's really too dangerous !
from sprite-factory.
No problem, I'll try to go through the last open issues and push a new version... maybe at the weekend ?
from sprite-factory.
take your time, this weekend or the next are both good options ! Thx a lot
from sprite-factory.
FYI: I've pushed a new sprite-factory gem (v1.5.0) with this change (and a couple others). You can read about it on codeincomplete.com
from sprite-factory.
this is huge, you made my day =)
from sprite-factory.
Related Issues (20)
- Feature Request: SASS Mixins HOT 10
- Add support for Retina sprites HOT 9
- When generating SASS files csspath should use image-url instead of url HOT 3
- Maven / Gradle plugin HOT 1
- Automatically detect CRUD directory changes? HOT 2
- :hover pseudo-class optimization HOT 1
- Alternatives? HOT 6
- JRuby options? HOT 2
- Test suite fails HOT 7
- NameError: uninitialized constant Magick::MaxRGB HOT 1
- Rewrite compass mixin HOT 1
- input must be a single directory HOT 2
- `width` `height` options is not working
- mini magic support? HOT 3
- comparison of Array with Array failed error
- input must be a single directory
- Showing alt tag on top of the image
- Support for SVG sprites
- Does not seem to work with rmagick 4.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sprite-factory.