W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: <di>? Please?

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 3 Feb 2012 20:22:08 +0000 (UTC)
To: Hugh Guiney <hugh.guiney@gmail.com>
cc: whatwg <whatwg@whatwg.org>, www-style@w3.org
Message-ID: <Pine.LNX.4.64.1202032014252.3868@ps20323.dreamhostps.com>
On Tue, 10 Jan 2012, Hugh Guiney wrote:
>
> As I understand it, the main reason for rejecting <di> was that it 
> solves a problem that is allegedly CSS's job, but as an author who uses 
> <dl>s quite extensively, adding a grouping element would really make my 
> life a lot easier.

There are a number of places in HTML where it would be nice to be able to 
group things together -- just look at how often people stick <div>s in 
their pages for no purpose whatsoever other than styling.

This shouldn't be necessary. It's a limitation of CSS.

The right solution is for CSS to provide some pseudo-element or other 
mechanism that introduces an anonymous container into the rendering tree 
that wraps the elements you want to wrap. For example, with the square 
brackets representing the anonymous boxes:

  <dl>
   [<dt><dd>]
   [<dt><dd>]
  </dl>

  dl::group(dt...dd) { border: solid; }


  <header>
   <p><a href="/">Home</a>
   [
     <h1>The Blog</h1>
     <p class="byline">Our blog away from home
   ]
   <p class="copyright">Bla bla
  </header>

  header::group(h1...p.byline) { border: solid; }


This isn't a formal proposal, but you get the idea. If we solve this 
problem, the need for <di> completely goes away, but more importantly, so 
does the need for a huge number of <div>s.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 3 February 2012 20:22:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT