Stuff & Nonsense product and website design

Harry Roberts: Quasi-qualified CSS selectors

Part way down Harry’s post, I found this gem.

/*html*/.product-page{
[styles]
}

I write the element in a comment so that it reads properly (a html element with a class of .product-page) but without altering the specificity at all.

Genius!



Written by Andy Clarke .


Would you like advice and inspiration on making better designs for the web?

Get monthly design inspiration and insights based on my 25+ years of experience. View some recent emails, sign up today, and get:

    I promise never to share your email address and you can unsubscribe with just one click.

    Free set of Layout Love grid templates when you sign up today.

    Hire me. I’m available for coaching and to work on design projects.