In http://lists.w3.org/Archives/Public/public-html/2009Sep/0735.html
Jeremy Keith wrote:
> Here is some CSS from a project I'm currently working on: ...
> h4,
> section h3, article h3,
> section section h2, article article h2,
> section article h2, article section h2,
> section section section h1, article article article h1,
> section section article h1, article article section h1,
> section article article h1, article section section h1 {
This (and later rules) misses cases like "article section article",
and the use of descendent instead of child means that higher level
rules will be applied instead.
One HTMLWG answer would be to declare some sort of subclass
relationship that could refer to any of {section, article, anything
else?}. Perhaps better would be extending selectors, but that should
be done by CSS.
My personal opinion is that it would be even better not to do this --
go ahead and use knowledge about your own site, perhaps by starting
with an ID, or using a class.
Except -- this seems to be what the outline algorithm (and the H1
everywhere) actually does. Is this complexity enough to consider
simplifying that in some way? (Maybe resetting to h2 when the type of
sectioning element changes, regardless of depth?)
-jJ