Last active
August 29, 2015 14:15
-
-
Save Razenbull/31135b411962ba9b64d9 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
// ---- | |
// Sass (v3.4.11) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin position($position, $args) { | |
@each $o in top right bottom left { | |
$i: index($args, $o); | |
@if $i and $i + 1 <= length($args) and type-of(nth($args, $i + 1)) == number { | |
#{$o}: nth($args, $i + 1); | |
} | |
} | |
position: $position; | |
} | |
@mixin absolute($args) { | |
@include position("absolute", $args); | |
} | |
@mixin fixed($args) { | |
@include position("fixed", $args); | |
} | |
@mixin relative($args) { | |
@include position("relative", $args); | |
} | |
.example { | |
@include absolute(top 50px right 100% bottom 1em); | |
} |
This file contains hidden or 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
.example { | |
top: 50px; | |
right: 100%; | |
bottom: 1em; | |
position: "absolute"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment