Parent selector

by Edward O’Connor on 23 January 2006

Andy Budd wants a parent selector in CSS3. Sounds good to me! I prefer the syntax given in one of his comments:

#child < .parent {…}

Update: Dylan Schiemann proposed this syntax back in 2000.

Update, May 2008: This sort of thing has popped up again, this time in Shaun Inman’s CSS Qualified Selectors. John Resig even implemented it for jQuery.

Comments

  1. I proposed this exact syntax for css parent selectors back in 2000 (and maybe others before me did so as well).

    Dylan Schiemann, 23 January 2006

  2. Thanks Dylan; I've updated the post to reflect that.

    hober, 23 January 2006

Add a comment

Posting...