Skip to content

Instantly share code, notes, and snippets.

@boriskaiser
Created December 5, 2012 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boriskaiser/4214241 to your computer and use it in GitHub Desktop.
Save boriskaiser/4214241 to your computer and use it in GitHub Desktop.
Special handling of keyword arguments
#please-wait {
background: url(/images/logo.png);
position: absolute;
top: 3em;
right: 0;
bottom: 3em;
left: 0;
}
@mixin wallpaper($image, $top: 0, $right: 0, $bottom: 0, $left: 0) {
background: $image;
position: absolute;
top: $top;
right: $right;
bottom: $bottom;
left: $left;
}
@mixin logo($offsets...) {
@include wallpaper(url(/images/logo.png), $offsets...);
}
#please-wait {
@include logo($top: 3em, $bottom: 3em);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment