kneath / kss

A methodology for documenting CSS and generating styleguides.
warpspire.com/kss
MIT License
4.04k stars 275 forks source link

Add pseudo selectors to kss.js/coffee #71

Closed benschwarz closed 11 years ago

benschwarz commented 11 years ago

After accepting #52, I thought that perhaps we should support other types of pseudo selectors.

This patch adds all other common pseudo selectors (with the exception of nth-* selectors).

I decided to PR this just to see if anyone else had a clever (read: clean) way to implement the nth-child, nth-of-type, and nth-last-child selectors.

ping @kneath

kneath commented 11 years ago

I'm down to try this out — I wonder about performance impact here, but I don't think it should be too big of a deal unless someone's styleguide has a ton of HTML.