Created
April 18, 2012 10:48
-
-
Save Chrisedmo/2412787 to your computer and use it in GitHub Desktop.
Placeholder Image Fetcher Function by: Anders Schmidt Hansen
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
.placeholder-500 { | |
display: block; | |
.placeholdit(500,300); // Magic! | |
.size(500,300); | |
} | |
// Call a Placehold.it image | |
.placeholdit(@width: 300, @height: 210) { | |
@placeholdIt: ~`"http://placehold.it/@{width}x@{height}"`; | |
background: url(@placeholdIt) no-repeat; | |
} | |
// Size Helper Function | |
.size(@width: 0, @height: 0) { | |
width: @width * 1px; | |
height: @height * 1px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment