W3C home > Mailing lists > Public > public-html@w3.org > December 2010

Re: suggestion for abolition of <hgroup>

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 26 Dec 2010 07:10:18 +0000 (UTC)
To: James Clark <jjc@jclark.com>
cc: HTML WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.64.1012260708560.27980@ps20323.dreamhostps.com>
On Fri, 24 Dec 2010, James Clark wrote:
> 
> The aspect of <hgroup> that I suspect will cause problems is the 
> mechanism for identifying the child of the <hgroup> that is the main 
> heading (ie the one that contributes to the outline).  The problem is 
> that you are often going to want to treat this child specially, eg for 
> styling or for transformations, and the rules that the spec describes 
> for identifying this child are relatively complex -- the first from 
> amongst those children with the highest rank. In particular, I can't 
> think of a way to write a CSS selector for this, and the only ways I can 
> think of to write an XPath expression for this are very hairy.

For this markup:

   <hgroup>
    <h1>HTML</h1>
    <h2>A markup language for the Web</h2>
   </hgroup>

...a rule to style the subheading would be:

   hgroup > h2 { ... }

In practice there's no need for a generic solution since the author of the 
CSS also controls the markup.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 26 December 2010 07:10:47 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:07 UTC