Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. /*
  2. * example: @include background@2x( 'path/to/image', 'png', repeat-x);
  3. */
  4.  
  5. @mixin background_2x($path, $ext: "png", $repeat: no-repeat) {
  6. $at1x_path: "#{$path}.#{$ext}";
  7. $at2x_path: "#{$path}@2x.#{$ext}";
  8.  
  9. background-image: url("#{$at1x_path}");
  10. background-repeat: $repeat;
  11.  
  12. @media all and (-webkit-min-device-pixel-ratio : 1.5),
  13. all and (-o-min-device-pixel-ratio: 3/2),
  14. all and (min--moz-device-pixel-ratio: 1.5),
  15. all and (min-device-pixel-ratio: 1.5) {
  16. background-image: url("#{$at2x_path}");
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement