Created
April 17, 2015 13:04
-
-
Save ogbaoghene/65c8cc5ba34ac6b7056d to your computer and use it in GitHub Desktop.
Simulate Sass 3.3 Maps data type when compiling with libsass (v2.0.0), still compiles successfully with Sass 3.3.
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
@function list-map($map, $map-key) { | |
@each $val in $map { | |
$key: nth($val, 1); | |
$value: nth($val, 2); | |
@if $map-key == $key { | |
@return $value; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment