Re: [whatwg] <di>? Please?

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 UTC