Skip to content

Instantly share code, notes, and snippets.

@Vitre
Created May 12, 2014 11:36
Show Gist options
  • Save Vitre/50d8700511cf4254a4cc to your computer and use it in GitHub Desktop.
Save Vitre/50d8700511cf4254a4cc to your computer and use it in GitHub Desktop.
// IPSUM image generator [http://ipsumimage.appspot.com]
$ipsum-img-api: 'http://ipsumimage.appspot.com' !default;
@mixin ipsum-img($width, $height, $label: false) {
@if $label {
background-image: url($ipsum-img-api + '/' + $width + 'x' + $height + '?l=' + $label);
} @else {
background-image: url($ipsum-img-api + '/' + $width + 'x' + $height);
}
background-position: center center;
}
// PLACEIMG generator [http://placeimg.com]
$place-img-api: 'http://placeimg.com' !default;
@mixin place-img($width, $height, $category, $filter: false) {
@if $filter {
background-image: url($place-img-api + '/' + $width + '/' + $height + '/' + $category + '/' + $filter);
} @else {
background-image: url($place-img-api + '/' + $width + '/' + $height + '/' + $category);
}
background-position: center center;
}
// FPOIMG generator [http://fpoimg.com]
$fpoi-img-api: 'http://fpoimg.com' !default;
@mixin fpoi-img($width, $height, $label: false) {
@if $label {
background-image: url($fpoi-img-api + '/' + $width + 'x' + $height + '?text=' + $label);
} @else {
background-image: url($fpoi-img-api + '/' + $width + 'x' + $height);
}
background-position: center center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment