Requires grunt-spritesmith which generates a spritesheet from a bunch of images.
This gist passes a custom template for spritesmith to generate the SCSS file.
Gruntfile.js
sprite: {
src: "images/*.png",
# Input strings like "52 lb 6 oz" or "8 oz" | |
def weight_string_to_float(weight_string) | |
/(?<lb>[0-9]*\slb\s)*(?<oz>[0-9]*\soz)/ =~ weight_string | |
lbs = 0 | |
unless lb.nil? | |
lbs += lb.to_i | |
end | |
unless oz.nil? | |
lbs += (oz.to_i * 0.0625) |
Requires grunt-spritesmith which generates a spritesheet from a bunch of images.
This gist passes a custom template for spritesmith to generate the SCSS file.
Gruntfile.js
sprite: {
src: "images/*.png",
/** | |
* Android 2.3.4 2d transform bug when 3d transform rule is given | |
*/ | |
.rotate-me-working { | |
position:absolute; | |
left:50%; | |
top:50%; | |
-webkit-transform: rotate(45deg); | |
} |