Opera 10 bug with CSS counters

After installing the latest version of Opera, I pointed that browser to this test page just to see if the bug I've reported a couple of months ago has been fixed or not. Unfortunately, the bug has not been fixed.

This test page has the following markup:

<ol>

<li>Item</li>

<li>Item</li>

<li>Item</li>
</ol>


<div>
<ul>
<li>Filler text</li>
</ul>
</div>

With the following styles:

ol {
 counter-reset: item;
}

ol li {
 display: block;
}

ol li:before {
 counter-increment: item;
 content: counter(item)". ";
}


div ul li {
 display: block;
}

div ul li:first-line {
 color: silver;
}

The bug occurs when you use a :first-line pseudo-element on the same element type that has been used to add counters. As you can see, Opera seems to apply the scope of the ol element to the whole document. Although this kind of behavior is not well defined by the CSS specifications, a bug like this may be really annoying if you stumble on it.

Update

Screenshot in Opera Version 10.50 pre-alpha Build 8174 Platform Mac OS X System 10.4.11:

Thanks to David Laakso!

Leave a Reply

Note: Only a member of this blog may post a comment.