Last active
August 29, 2015 13:56
-
-
Save hectorpalmatellez/8857092 to your computer and use it in GitHub Desktop.
Mixin para reemplazar texto con una imagen en Compass
This file contains hidden or 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
@mixin repimg($img, $ancho, $alto) { | |
display: block; | |
text-indent: -9999px; | |
background: { | |
image: url($img); | |
repeat: no-repeat; | |
} | |
width: $ancho; | |
height: $alto; | |
} | |
// Entonces la idea es poner en $img la ruta a la imagen | |
// En $ancho el ancho de la imagen y en $alto el alto | |
// Se me ocurrió cuando tengo sueño. | |
// Ejemplo de uso: | |
// .logo { | |
// @include repimg('../images/logo.png', 420px, 92px); | |
// } | |
// ^^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment