// =============================================================================
// Z-INDEX (Settings)
// =============================================================================
// Keep track of all your z-index values in one central location.
// Never add another 9 or 0 again to try to beat some random number somewhere in
// your code, those days are numbered... Get it? Did you get it...?
// -----------------------------------------------------------------------------


// Z-index map
// -----------------------------------------------------------------------------

$zIndexMap: (
    1: 10,
    2: 20,
    3: 30,
    4: 40,
    5: 50,
    6: 60,
    7: 70,
    8: 80,
    9: 90
);


// Z-index applications
// -----------------------------------------------------------------------------
// Variables for all of your z-index uses. This allows us to see all layers from
// one central location. Prefix your z-index variable with '$zIndex-'.
//
// Example: $zIndex-tooltip: zIndex(9);
// -----------------------------------------------------------------------------






// Z-index function
// -----------------------------------------------------------------------------

@function zIndex($zIndex) {
    @if map-has-key($zIndexMap, $zIndex) {
        @return map-get($zIndexMap, $zIndex);
    }
    @warn "Unknown z-index '#{$zIndex}' used in zIndex function.";
    @return null;
}

// =============================================================================
// Z-INDEX (Settings)
// =============================================================================
// Keep track of all your z-index values in one central location.
// Never add another 9 or 0 again to try to beat some random number somewhere in
// your code, those days are numbered... Get it? Did you get it...?
// -----------------------------------------------------------------------------


// Z-index scale
// -----------------------------------------------------------------------------

$zIndex-1: 10;
$zIndex-2: 20;
$zIndex-3: 30;
$zIndex-4: 40;
$zIndex-5: 50;
$zIndex-6: 60;
$zIndex-7: 70;
$zIndex-8: 80;
$zIndex-9: 90;


// Z-index applications
// -----------------------------------------------------------------------------
// Variables for all of your z-index uses. This allows us to see all layers from
// one central location. Prefix your z-index variable with '$zIndex-'.
//
// Example: $zIndex-tooltip: zIndex(9);
// -----------------------------------------------------------------------------

$zIndexMap: (
    'dropdown': $zIndex-6,
    'tooltip': $zIndex-7,
    'dialog': $zIndex-8
);




// Z-index function
// -----------------------------------------------------------------------------

@function zIndex($zIndex) {
    @if map-has-key($zIndexMap, $zIndex) {
        @return map-get($zIndexMap, $zIndex);
    }
    @warn "Unknown z-index '#{$zIndex}' used in zIndex function.";
    @return null;
}

Rework how z-index settings are written.
Rework how z-index settings are written.
