W3C home > Mailing lists > Public > public-html@w3.org > September 2009

section/article grouping and CSS [was: Re: what is dt?]

From: Jim Jewett <jimjjewett@gmail.com>
Date: Wed, 23 Sep 2009 11:39:39 -0400
Message-ID: <fb6fbf560909230839u30686a69hdfb011612fdb86bf@mail.gmail.com>
To: HTML WG Public List <public-html@w3.org>
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?)

Received on Wednesday, 23 September 2009 15:40:38 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:51 UTC