-
Notifications
You must be signed in to change notification settings - Fork 0
/
spritesheet.scss
17 lines (17 loc) · 1.08 KB
/
spritesheet.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//
// Created with TexturePacker http://www.codeandweb.com/texturepacker
//
// SmartUpdateHash: {{smartUpdateKey}}
//
@mixin sprite { display:inline-block; overflow: hidden; background-repeat: no-repeat; background-image: url('{{texture.fullName}}'); background-size: {{texture.size.width}}px {{texture.size.height}}px; }
.sprite { @include sprite }
@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (-webkit-min-device-pixel-ratio: 1.3), (min-resolution: 124.8dpi), (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)
{
.sprite{
background-image: url('{{texture.trimmedName}}-retina.png');
}
}
{% for sprite in sprites %}
.sprite.{{sprite.trimmedName}} { width: {{sprite.frameRect.width}}px; height: {{sprite.frameRect.height}}px; background-position: -{{sprite.frameRect.x}}px -{{sprite.frameRect.y}}px; }
@mixin {{sprite.trimmedName}} { width: {{sprite.frameRect.width}}px; height: {{sprite.frameRect.height}}px; background-position: -{{sprite.frameRect.x}}px -{{sprite.frameRect.y}}px; }
{% endfor %}