Re: [CSS2.1] Position of list-item markers

I've always felt uneasy with the way list markers work. Generally it's a bad
idea to have a bunch of special cases, so it would probably be advantageous
to describe the font marker in another manner.

Essentially the marker is a pseudo-element, right. So lets see if we can
describe it with other CSS that can be more flexible. Once we do that, the
list-style property can just be a shortcut to those properties.

Here's something I tried to loosely replicate the list marker. Works best in
Firefox 3.

li{list-style:none;}
li:before{
  content: 'o';
  display: inline-block;
  position: absolute;
  margin-left: -15px;
  margin-right: 8px;}

<ul>
  <li>text</li>
  <li>text</li>
</ul>

Obviously it's a hacky example, but describing the list marker with other
css properties may help us nail down it's behavior, and make the spec easier
to understand as well as implement.

Received on Wednesday, 26 November 2008 13:15:02 UTC