W3C home > Mailing lists > Public > www-style@w3.org > September 2003

Re: One more list-item thought

From: <staffan.mahlen@comhem.se>
Date: Mon, 15 Sep 2003 11:59:42 +0200
To: Ian Hickson <ian@hixie.ch>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <3F65A9AE.26116.AA6854@localhost>

On 14 Sep 2003 at 14:50, Ian Hickson wrote:
> Given that we've discussed more than 2 models in this thread, that there
> are at least two interpretations of the CSS2 model, and that CSS2.1 and
> the current CSS3 draft have yet more models, I'm not sure how to answer
> that. :-) Obviously, CSS3 is trying to be the best model.

Well, the particular issue on what display: list-item should mean 
does not differ in any of the models i believe. Having reread your 
suggested solution a few times i think i understand what you mean 

It might however be useful to note that there seem to be no backwards 
compatibility issues with changing this to something like what you 
outlined in your previous message, since the current major 
implementations does not seem to comply with the rec or usually 
amongst themselves. 

> > Hmm, care to elaborate on that bit about "superior parent"? I did not
> > quite get it.
> See the CSS3 Generated and Replaced Content model, which is part of the
> same model:
>    http://www.w3.org/TR/css3-content/
Oh dear, recursive ::before/::after, i do have a lot to learn...

> > >Maybe there is value to changing the way
> > >list-item works. How about saying '::marker' is generated 
> > >whenever its 'content' computes to something other than
> > >'inhibit', but normal' for '::marker' computes to 'inhibit'
> > >unless its superior parent's 'display' computes to 'list-item'?
> > >Then 'display:list-item' can still be in charge of the 
> > >'list-item' counter, but to do the h2 case you would just do:
> > >
> > > h2::marker { content: counter(h2) '.'; counter-increment: h2; }

I would prefer moving away from the display: list-item dependancy and 
see the display property for the element more as how the list item 
should be rendered than the controller of the features implied. By 
making the existance of the ::marker the trigger for increasing the 
list-item counter and the applicability of various list properties i 
think you also add the ability to:
li {display: inline}
(Assuming the default style sheet held the marker rule and markers 
are rendered inline for non-list-item-displayed elements).

The h2 case could then be solved with:
h2::before { content: counter(h2) '.'; counter-increment: h2; }
or if you wished it to take part in the current list context:
h2::marker {content: normal}
(which i think should be equivalent with
 h2::before { content: counter(list-item) '.'; counter-increment: 
list-item; }
 except that only ::markers appear outside per default in a display:  
list-item element and assuming the current list-style-type is decimal 

which in case the display property was not modified, would generate  
an inline marker.

It may be possible/useful to state that display: list-item implies a 
::marker {display: normal} rule, but i think i would prefer to just 
see it as a way of achieving the outside positioned marker. 

I do realise this is a major change, and reading a bit more about 
generated content i also see that markers are used for various note 
features as well which probably invalidates the above specific 
solution. I think you see what i am aiming for however, and i suppose 
that one solution might be to separate list-item-markers into a new 
pseudo element.

Received on Monday, 15 September 2003 05:59:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:08 UTC