W3C home > Mailing lists > Public > www-style@w3.org > December 2009

Re: Request for ::di pseudoelement

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 18 Dec 2009 16:33:17 -0800
Message-Id: <F091ACF1-10E4-4D91-BA88-D8A2BCB19B63@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>

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

> 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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:41 UTC