Skip to content

Instantly share code, notes, and snippets.

@aarongustafson
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarongustafson/eddda1f32ed102cedd86 to your computer and use it in GitHub Desktop.
Save aarongustafson/eddda1f32ed102cedd86 to your computer and use it in GitHub Desktop.
Quantity Queries - some bits and bobs from Haydon Pickering’s article (http://alistapart.com/article/quantity-queries-for-css).
li:nth-last-child(6):first-child,
li:nth-last-child(6):first-child ~ li {
color: green;
}
li:nth-last-child(-n+6):first-child,
li:nth-last-child(-n+6):first-child ~ li {
/* properties here */
}
li:nth-last-child(n+6),
li:nth-last-child(n+6) ~ li {
/* properties here */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment