You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
778 B

9 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. [class^={{packageName}}-] {
  2. display:inline-block;
  3. vertical-align:middle;
  4. position: relative;
  5. text-indent: -99999px;
  6. overflow: hidden;
  7. background-repeat: no-repeat;
  8. background-image: url('{{{spritesheet.escaped_image}}}');
  9. {{#spritesheet}}
  10. $total_width: {{width}};
  11. $total_height: {{height}};
  12. {{/spritesheet}}
  13. {{#block "sprites"}}
  14. {{#each sprites}}
  15. &.{{packageName}}-{{name}} {
  16. background-size: (($total_width / {{width}}) * 100%) (($total_height / {{height}}) * 100%);
  17. background-position: (({{offset_x}} / ($total_width - {{width}})) * -100%) (({{offset_y}} / ($total_height - {{height}})) * -100%);
  18. width: {{px.width}};
  19. height: {{px.height}};
  20. }
  21. {{/each}}
  22. {{/block}}
  23. }