28 Nov '13, 5am

“CSS :first-child, :nth-child, and :last-child are not like :eq - Pivotal Labs”

One mistake I’ve seen made a few times is the notion that CSS’s nth-child pseudoselector acts like jQuery’s :eq pseudoselector. jQuery’s :eq(n) pseudoselector gives you a single element that is at index n out of all matched elements. While this is certainly a useful selector to have, it’s unfortunately not supported in standard CSS. If you find yourself repeatedly using :eq in your jQuery code, be careful that you are not relying too heavily on :eq to the point where your styles are difficult to match in “pure” CSS. If we were to express :nth-child in terms of the :eq selector, it would be like using :eq scoped to all of the immediate descendant contents of a single element. Or in my own words, :nth-child adds a constraint to the selector that the matched element must be the nth element in its parent container. So if we had a snippet of HTML like <div> <div id="bar1" class...

Full article: http://pivotallabs.com/css-first-child-nth-child-and-last...

Tweets

@pivotallabs We transform how the world builds ...

pivotallabs.com 28 Nov '13, 2am

Why pair design? This post has been pair-authored by Kim Dowd and Pam Dineva, designers at Pivotal Labs. Consultancies and...

If you would like to see me do another talk, yo...

larubyconf.com 02 Dec '13, 11pm

The 10X Developers, Top Talent, Rockstars. A-Players. Tradition states that these are exceptional humans, possessing talen...

merging scopes with STI models - Pivotal Labs:

pivotallabs.com 27 Nov '13, 5pm

On a client project recently, we ran into a domain problem that didn’t fit into the ActiveRecord standard conventions. The...

@fowlduck more like GC.start:

unicorn.bogomips.org 28 Nov '13, 2am

Runs GC after requests, after closing the client socket and before attempting to accept more connections. This shouldn't h...

First Rwandan in and another tasty Maracaturra yes!

First Rwandan in and another tasty Maracaturra ...

shop.squaremilecoffee.com 28 Nov '13, 6pm

This lot of coffee is from the Remera washing station owned by Buf Cafe in the Southern Province of Rwanda. Buf is derived...

Use Deadweight and your integration suite to au...

robots.thoughtbot.com 28 Nov '13, 11pm

Use Deadweight and your integration suite to automatically find unused CSS rules Jason Morrison January 04, 2011 integrati...

First Rwandan in and another tasty Maracaturra yes!

First Rwandan in and another tasty Maracaturra ...

shop.squaremilecoffee.com 28 Nov '13, 6pm

Santa Gema is the name of the farm where this coffee is from, it is owned and run by Mario José Vilchez Urbina and his fam...

CRI ALRET - CHILD RESCUE IRELAND

dublinbus.ie 28 Nov '13, 5am

Saturday Timetables During Christmas Period CRI ALERT Dublin Bus is ‘Appy’ to be the Winner Diversion Route 59 Routing Cha...

Tidying up in the warehouse found one last MANCHU Coat from last winter's collection....get it here...

Tidying up in the warehouse found one last MANC...

komodo.co.uk 28 Nov '13, 3pm

KOMODO customer reviews gives you the chance to give your opinion on our products. See what customers had to say about thi...