Guest User

Untitled

a guest
Sep 14th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 0.79 KB | None | 0 0
  1. // original code before using compass feature
  2. // translating this to scss using compass sprite.
  3.  
  4.  
  5. a {
  6.              background:url(/assets/img/logo.png) 0 50% no-repeat;
  7.              height: 100px;
  8.              width:120px;
  9.              display: block;
  10.             text-indent:-9999px;
  11.             overflow:hidden;
  12.  
  13.         }
  14.  
  15.  
  16.  
  17.  
  18. //  new code using compass + scss
  19.  
  20. @import compass;
  21. @import "spr/*.png";
  22.  
  23.  
  24. a {
  25.              @include spr-sprite("logo");
  26.              @include hide-text;
  27.              height: 100px;
  28.              width:120px;
  29.         }
  30.  
  31.  
  32.  
  33.  
  34.  
  35. // rendered code - notice it has no "0 50%"
  36.  
  37. .spr-sprite, a {
  38.   background: url('../img/spr-s91d142b02d.png') no-repeat; }
  39.  
  40.  a {
  41.     background-position: 0 0;
  42.     text-indent: 110%;
  43.     white-space: nowrap;
  44.     overflow: hidden;
  45.     height: 100px;
  46.     width: 120px; }
Add Comment
Please, Sign In to add comment