Re: Request for ::di pseudoelement

On Dec 18, 2009, at 3:18 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

> Well, I find myself once again ripping out a <dl> and replacing it
> with a <ul> with headers in the <li>s, because there's no grouping
> element around <dt>s and <dd>s.  There's a perennial request for a
> <di> element, but that's not really the correct place to solve the
> problem - HTML has no need for any additional help in grouping the
> dt/dd elements, as the grouping is well-defined in the spec.  This is
> purely a styling issue, and a common one for me.
>
> So, I propose a ::di pseudoelement.  It would wrap around groups of
> <dt>/<dd>s, according to the grouping algorithm in HTML.  You'd use it
> like:
>
> dt::di { border: 1px solid black; margin: 1em 0; }
>
> Multiple elements can refer to the same ::di if they're in the same  
> group.

That would be very useful.

> It's possible that this can have its definition generalized somewhat
> so it makes sense outside of this specific use-case.

Maybe "Presentation Levels" could be wrangled into doing that? Or is  
that spec actually "specifiction" (my new favorite word)?

> ::key-value-group was suggested by zcorpan some time ago.  I don't
> have any idea if this would be worth the extra typing, though - it
> doesn't appear that there are any additional uses for this in HTML
> itself, and I'm not familiar enough with other markup languages that
> use CSS to tell if this would solve any problems for them.
>
> ~TJ
>

Received on Saturday, 19 December 2009 00:35:02 UTC