The CSS3 `:not( :last-child )` Selector is the Best

I used to do stuff like this a lot:

.post > * { margin-bottom: 20px; }
.post > :last-child { margin-bottom: 0; }

But now that we’ve dropped support for IE8, I can do this:

.post > :not( :last-child ) { margin-bottom: 20px; }

Cherish these moments.


Scott Fennell
Scott Fennell is a WordPress theme & plugin developer in Anchorage, AK.