Skip to content

Instantly share code, notes, and snippets.

@arekbartnik
Last active August 29, 2015 14:13
Show Gist options
  • Save arekbartnik/1219105e057c32fb48b8 to your computer and use it in GitHub Desktop.
Save arekbartnik/1219105e057c32fb48b8 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
/**
* Przykład pierwszy
*/
$zindex: (
fullscreen: 1000,
adv-modal: 900,
adv-overlay: 800,
modal: 600,
overlay: 500,
sticky: 400,
dropdown: 300,
header: 200,
footer: 100
);
@function zindex($layer) {
@if(map-has-key($zindex, $layer)) {
@return map-get($zindex, $layer);
} @else {
@warn "Brak klucza skali";
@return false;
}
}
.hello {
z-index: zindex(footer);
}
/**
* Przykład drugi
*/
$zindex-1: 100;
$zindex-2: 200;
$zindex-3: 300;
$zindex-4: 400;
$zindex-5: 500;
$zindex-6: 600;
$zindex-7: 700;
$zindex-8: 800;
$zindex-9: 900;
$zindex-10: 1000;
.hello {
z-index: $zindex-1;
}
/**
* Kontekst
*/
$zindex--header: $zindex-1;
.header {
z-index: $zindex--header;
}
@charset "UTF-8";
/**
* Przykład pierwszy
*/
.hello {
z-index: 100;
}
/**
* Przykład drugi
*/
.hello {
z-index: 100;
}
/**
* Kontekst
*/
.header {
z-index: 100;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment