[whatwg] <di>? Please?

fantasai fantasai.lists at inkedblade.net
Sat Feb 4 12:49:34 PST 2012


On 02/03/2012 12:22 PM, 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.

I don't think this is a CSS problem. I think it's an HTML problem.
It's not just that you might want to style definition items, you
might also want to tag them with an ID so you can use them as a
target anchor. Or pick them up and do interesting things with them
via script. But you can't do any of these three things because you
can't wrap them in an element.

Pseudo-elements are a non-trivial thing to spec, and a non-trivial
thing to implement, and a comparatively confusing thing to use. Yet
you're suggesting that we use them to solve a problem that is not
even entirely solved by a new pseudo-element, rather than defining
an appropriate HTML element for the job. So what is it about defining
a real element that is so problematic that we're considering a pseudo-
element here?

~fantasai



More information about the whatwg mailing list