Created
September 8, 2014 09:00
-
-
Save chmanie/a24ee561fed415a0fd87 to your computer and use it in GitHub Desktop.
CSS rules for the last child and the next-to-last child but only when total child number is even
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .my-class:last-child { | |
| // stuff | |
| } | |
| .my-class:nth-last-child(2):nth-child(odd) { | |
| // same stuff as above | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment