Re: [CSS3] Generated and Replaced Content - Grouping (long, examples)

On Thu, 30 Oct 2003, Chris Moschini wrote:
> Ian Hickson [ian@hixie.ch] wrote:
>> I don't have a problem explaining how the rendering would work, but I have lots of trouble
>> deciding on a syntax. All the syntaxes I've looked at have been very inadequate.
>
> Is the goal to shortcut the move-to: ident; content: pending( ident ); ?
> Or is the goal to do something a little different; for example to group
> Elements on the same level but not necessarily siblings into an
> anonymous, or make them children of a common anonymous parent?

The last two. The most common case is:

   <dl>
    <dt>...</dt>
    <dd>...</dd>
    <dt>...</dt>
    <dd>...</dd>
    <dt>...</dt>
    <dd>...</dd>
   </dl>

...which we want to style as:

   <dl>
    <::pseudo>
     <dt>...</dt>
     <dd>...</dd>
    </::pseudo>
    <::pseudo>
     <dt>...</dt>
     <dd>...</dd>
    </::pseudo>
    <::pseudo>
     <dt>...</dt>
     <dd>...</dd>
    </::pseudo>
   </dl>

The questions are:

   * which element is the ::pseudo a pseudo-element of?
   * what syntax do you use to say you want to group them like that?

A solution could be:

   dl::pseudo(from the earliest ungroupped dt,
              including all the dts that immediately follow it,
              including all the dds that immediately follow _that_,
              and stopping just before the next dt or the end of parent)

...although of course that's rather verbose.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Thursday, 30 October 2003 14:13:44 UTC