Automatic height and width with compass sprites
A time saving way to get the css dimensions of large collections of sprites.
folder is the name of the folder where your sprites are.
$folder-sprite-dimensions: true; // the magic!
@import "folder/*.png";
@include all-folder-sprites;
Compass will include the height and width of the original file in the sprite selector.
This was hidden away in a discussion thread in the compass-docs
Written by nick
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sprites
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#