[CSS2.1] Interaction (or lack of such) of lists and counters

Quote from CSS2.1
	In CSS 2.1, content may be generated by two mechanisms:
	The 'content' property, in conjunction with the :before and :after
pseudo-elements. 
	Elements with a value of 'list-item' for the 'display' property.

The problem is that this two mechanisms does not want to play together,
which I consider as one of the uglyests thing in CSS2.1
In many articles people use the following style for bibliographical lists:

	[1] item one
	[2] item one
	[3] item one

Now try to adjust default XHTML style sheet to make list markers
customisable. The only solution I managed to find so far is
quite ugly and can replace lists with "list-style-position:outside" only

ol
	{display:table;
	margin:0;
	counter-reset:item;}
li
	{display:table-row;
	counter-increment:item;}
li:before
	{content: "[" counter(item) "]";
	padding:1ex;
	display:table-cell;}

This happens because list-style properties are not integrated with the
rest of CSS2.1. You can't adjust style of list style markers, they behave
like 
foreign objects that lay ouside the scope of CSS. The present solution is
quite ugly
and I think list-style-type should be merged somehow with the rest of CSS.

Received on Wednesday, 15 June 2005 14:47:50 UTC