<article class=“entry”>
<header>
<h1 class=“posttitle”>Don’t include this h1 in the ruleset</h1>
</header>
<p>Content goes here</p>
<h1>Do include this h1 in the ruleset</h1>
<p>More Content goes here</p>
<h2>Do include this h1 in the ruleset</h2>
<p>More Content goes here</p>
</article>
Glad I was able to help you out :). I reported your post to the mods so they should change it very soon. I n oticed that originally but I knew where you were going with it :).
The appearance of the :not() filter appears to completely trip up IE < 8 from applying any of the rules. I don’t expect them to recognize the not(), but I was also :not expecting its appearance to invalidate the rules it understands.
If a browser does not understand the pseudo element/class then it is required to drop out of the rule block completely. If you have comma separated rules then they will all be lost to the browser. You should therefore keep your advanced selectors separate from normal rules. Browsers do vary on how they handle this though.
That code doesn’t say anything. Inheritance is already part of CSS. Well, except in IE, where things like fonts and colours I don’t think understand “inherit”.
“inherit” doesn’t override new styles coming along who also hit h1.posttitle anyway. I’m not even sure if “inherit” is a valid value for some of those properties.
My question would be what values do you NOT want set on .posttitle, or what values would be different; as rather than screwing around with fancy selectors I’d just override the values back to what they are supposed to be.
Sounds like your CSS code order and/or your element specificity is wrong… thought that too can go hand-in-hand with HTML 5’s new nonsensical structural rules leading to broken/nonsensical use of heading tags and extra tags for nothing – making inheritance and element targeting a total mess.
Which is why before worrying about that I’d ditch the HTML 5 garbage…
I figured I hadn’t seen “inherit” in all the “Value: <length> | <percentage> | auto | inherit” lines, maybe it was the more recent stuff like linear-gradient…