Skip to content

Instantly share code, notes, and snippets.

@MichaelArestad
Created August 11, 2014 17:13
Show Gist options
  • Save MichaelArestad/6bd5332292068c5934ab to your computer and use it in GitHub Desktop.
Save MichaelArestad/6bd5332292068c5934ab to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
$end: 20;
@for $i from 1 through $end {
div:nth-child(#{$i}){
z-index: $end - $i + 1;
}
}
div:nth-child(1) {
z-index: 20;
}
div:nth-child(2) {
z-index: 19;
}
div:nth-child(3) {
z-index: 18;
}
div:nth-child(4) {
z-index: 17;
}
div:nth-child(5) {
z-index: 16;
}
div:nth-child(6) {
z-index: 15;
}
div:nth-child(7) {
z-index: 14;
}
div:nth-child(8) {
z-index: 13;
}
div:nth-child(9) {
z-index: 12;
}
div:nth-child(10) {
z-index: 11;
}
div:nth-child(11) {
z-index: 10;
}
div:nth-child(12) {
z-index: 9;
}
div:nth-child(13) {
z-index: 8;
}
div:nth-child(14) {
z-index: 7;
}
div:nth-child(15) {
z-index: 6;
}
div:nth-child(16) {
z-index: 5;
}
div:nth-child(17) {
z-index: 4;
}
div:nth-child(18) {
z-index: 3;
}
div:nth-child(19) {
z-index: 2;
}
div:nth-child(20) {
z-index: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment