Created
August 25, 2015 21:38
-
-
Save brianjhanson/965003a70d82d8fee7df to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$spacing: ( | |
xs: 2.5rem, | |
s: 4rem, | |
m: 6rem, | |
l: 8rem, | |
xl: 10rem | |
); | |
@function get-prev($key, $map: $spacing) { | |
$values: map-values($map); | |
$keys: map-keys($map); | |
$idx: index($keys, $key); | |
@return nth($values, ($idx - 1)); | |
} | |
.something { | |
test: get-prev(s); | |
} |
This file contains 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
.something { | |
test: 2.5rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment