Skip to content

Instantly share code, notes, and snippets.

@mcrider
Created July 23, 2014 21:45
Show Gist options
  • Save mcrider/7e8d5c2a3b042e87f183 to your computer and use it in GitHub Desktop.
Save mcrider/7e8d5c2a3b042e87f183 to your computer and use it in GitHub Desktop.
z-indexes in sass maps
$z-index: (
modal : 200,
navigation : 100,
footer : 90,
triangle : 60,
navigation-rainbow : 50,
share-type : 41,
share : 40,
);
@function z-index($key) {
@return map-get($z-index, $key);
}
@mixin z-index($key) {
z-index: z-index($key);
}
.navigation {
@include z-index(navigation);
}
.modal {
@include z-index(modal);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment