Skip to content

Instantly share code, notes, and snippets.

@airen
Created June 20, 2014 09:18
Show Gist options
  • Save airen/fa77ef75380b1ef0ddba to your computer and use it in GitHub Desktop.
Save airen/fa77ef75380b1ef0ddba to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
@charset "UTF-8";
$z-layers: (
"goku": 9001,
"shoryuken": 8000,
"modal": (
"base": 500,
"close": 100,
"header": 50,
"footer": 10
),
"default": 1,
"below": -1,
"bottomless-pit": -9000
);
@function z($layer) {
@if not map-has-key($z-layers, $layer) {
@warn "No layer found for `#{$layer}` in $z-layers map. Property omitted.";
}
@return map-get($z-layers, $layer);
}
@function map-deep-get($map, $keys...) {
@each $key in $keys {
$map: map-get($map, $key);
}
@return $map;
}
.modal {
position: absolute;
z-index: z("modal", "base");
.close-button {
z-index: z("modal", "close");
}
header {
z-index: z("modal", "header");
}
footer {
z-index: z("modal", "footer");
}
}
.goku {
z-index: z("goku");
}
Function z takes 1 argument but 2 were passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment