Skip to content

Instantly share code, notes, and snippets.

@stansidel
Last active December 21, 2015 07:29
Show Gist options
  • Save stansidel/6271776 to your computer and use it in GitHub Desktop.
Save stansidel/6271776 to your computer and use it in GitHub Desktop.
Reversing z-index based from page render order http://stackoverflow.com/a/7033617/758990
#nav ul li {
@for $i from 1 through 20 {
&:nth-child(#{$i}) {
z-index: 1000 - $i
};
}
}
@sixcorners
Copy link

z-index can be negative... Why not just z-index: -$i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment