Having a :parent CSS Selector Would Rock. Right?

Posted: October 11, 2010 Comments(3)

There’s quite a fascinating discussion going on via blog posts within the past few days. It’s not too often that we get to observe a technical discussion surrounding CSS, but when it happens, it’s good.

Like nearly all discussions with CSS from the past year or two, the underlying thought processes isn’t completely new, but what I love to see is the heightened level of discussion going on from post to post.  What’s even better is that we’re thinking about these issues as though we’re engineers instead of designers. We’re thinking about the impact a plausible decision would have on The Big Picture and that’s beyond awesome.

The latest discussion considers a :parent CSS selector. If you haven’t had a chance to read about it, you’ll be caught up after reading:

If you consider yourself a front end developer, engaging in this thought process and conversation should be eye opening.

I’d also like to take a minute to ask if this type of thinking is commonplace for you as you work; do you think about how possible it is for your ideas to impact something so significant? That’s one of the many benefits to working in an industry like ours, it’s still The Renaissance.

Get my newsletter

Receive periodic updates right in the mail!

  • This field is for validation purposes and should be left unchanged.


  1. It’s always nice to see a resurgence of discussions like this. I remember wondering this a few years back. One specific example is where people want to style an image within an ‘a’ tag. So, if it’s a linked image, style it differently. Yes, you can add the class to the image itself, but it would be nice to say ‘if my parent is a link, I get these styles applied’.

    I also like the thought process, and thorough explanations around the impact of something like this. We usually get these around discussions where people want CSS to be a dynamic language and have variables (again, something that incurs overhead based on it’s very nature).

    The thing I love about this thought process is that it helps people see the different roles that HTML, CSS, and JavaScript play – and how they are best utilized.

  2. As a Client Side Design manager, I am always pushing my team to think more like this, for no other reason than it helps put into perspective our role in the process.

    When I started, our little team were known as the “chop” team, as that is what we did, we chopped designs into static HTML.

    Now, we have a fancy title, but we have a bigger responsibility. We are now in charge of designing the client side… everything from behaviour, to the main structure and layout (obviously with help from other teams).

    CSS now is much more about working in harmony with developers to allow a site to be the best it can.

    The latest trends and developments in CSS overlap alot more with development, and thinking this way is just the start.

    Oh, and a parent selector would be AWESOME cool.



Leave a Reply

Your email address will not be published. Required fields are marked *