Created
September 23, 2015 07:19
-
-
Save hbsnow/a9179f0ef8e97dd53e17 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.14) | |
// Compass (v1.0.3) | |
// ---- | |
$layers: ( | |
forefront: 9001, | |
modal: ( | |
base: 9000, | |
header: 801, | |
main: 101, | |
footer: 201 | |
), | |
header: 801, | |
main: 1, | |
footer: 101, | |
back: -1 | |
); | |
@function map-deep-get($map, $keys...) { | |
$value: $map; | |
@each $key in $keys { | |
$value: map-get($value, $key); | |
} | |
@return $value; | |
} | |
@function layer-get($keys...) { | |
@if not variable-exists(layers) { | |
@error "`$layers` is not defined."; | |
} | |
@if not function-exists(map-deep-get) { | |
@error "`map-deep-get` function is not available."; | |
} | |
@return map-deep-get($layers, $keys...); | |
} | |
.modal { | |
position: relative; | |
z-index: layer-get("modal", "base"); | |
} |
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
.modal { | |
position: relative; | |
z-index: 9000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment