Skip to content

Instantly share code, notes, and snippets.

@AdamHjerpe
Forked from imlinus/position.scss
Last active December 29, 2015 08:48
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 AdamHjerpe/7645514 to your computer and use it in GitHub Desktop.
Save AdamHjerpe/7645514 to your computer and use it in GitHub Desktop.
Absolute positioning mixin
@mixin position(
$position: absolute,
$top: null,
$right: null,
$bottom: null,
$left: null
) {
position: $position;
top: $top;
right: $right;
bottom: $bottom;
left: $left;
}
// Usage:
// .box {
// @include position(absolute, $top: 0, $left: 1.5rem);
// }
//
// Result:
// .box {
// position: absolute;
// top: 0;
// left: 1.5rem;
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment