Created
February 25, 2011 06:59
-
-
Save burnto/843455 to your computer and use it in GitHub Desktop.
Image replacement scss mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Image replacement scss mixin | |
@mixin image_replace($img, $width, $height, $x: 0, $y: 0) { | |
display: block; | |
background: image-url($img) no-repeat $x $y; | |
width: $width; | |
height: $height; | |
overflow: hidden; | |
text-indent: -9999em; | |
} | |
// --- Usage --- | |
header { | |
#logo { | |
@include image_replace("logo.png", 200px, 64px); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment