Skip to content

Instantly share code, notes, and snippets.

@tsi
Created February 21, 2016 09:00
Show Gist options
  • Save tsi/0bd1d26c020d49a79b46 to your computer and use it in GitHub Desktop.
Save tsi/0bd1d26c020d49a79b46 to your computer and use it in GitHub Desktop.

Revisions

  1. tsi created this gist Feb 21, 2016.
    17 changes: 17 additions & 0 deletions _ir.scss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // ----------------------------------------------
    // Image Replacement
    // ----------------------------------------------

    @mixin ir($img, $width: image-width($img), $height: image-height($img), $x: 50%, $y: 50%) {
    background: {
    image: image-url($img);
    repeat: no-repeat;
    position: $x $y;
    };
    width: $width;
    height: $height;
    text-indent: $width;
    overflow: hidden;
    white-space: nowrap;
    display: block;
    }