Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fitted backgrounds using Compass
@mixin fit_bg($url){
background-image: image-url($url);
display: block;
height: image-height($url);
width: image-width($url);
}
// Usage
.nav-about {
@include fit_bg('assets/structure/nav/about.png');
text-indent: -9999px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment