Skip to content

Instantly share code, notes, and snippets.

@yvesvanbroekhoven
Last active December 11, 2015 20:49
Show Gist options
  • Save yvesvanbroekhoven/4658251 to your computer and use it in GitHub Desktop.
Save yvesvanbroekhoven/4658251 to your computer and use it in GitHub Desktop.
Spiderman is a mixin to absolute position an element in his first relative parent, top to bottom, left to right.
//
// Spiderman is a mixin to absolute position an element
// in his first relative parent, top to bottom, left to right.
//
// @param $offset Offset from the edge
//
@mixin spiderman($offset: 0) {
bottom: $offset;
left: $offset;
position: absolute;
right: $offset;
top: $offset;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment