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

Re: [whatwg] <di>? Please?

From: Sean Hogan <shogun70@westnet.com.au>
Date: Sat, 04 Feb 2012 09:14:51 +1100
Message-ID: <4F2C5C5B.6010009@westnet.com.au>
To: www-style@w3.org
CC: Ian Hickson <ian@hixie.ch>, Hugh Guiney <hugh.guiney@gmail.com>, whatwg <whatwg@whatwg.org>
On 4/02/12 7:22 AM, Ian Hickson wrote:
> 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.
>
Could you provide examples for how this suggestion solves styling 
specific name-value groups within the <dl>, e.g.

     dl > li.hidden { display: none; }

     dl > li.closed > dd { display: none; }

     dl > li::even { background-color: #ccc; }
Received on Friday, 3 February 2012 22:15:20 GMT

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