Hussein Shafie schrieb:
> Yves Forkl wrote:
>> XXE 3.8.1 seems to behave in a strange manner with respect to the 
>> counter-reset CSS instruction as soon as you try to reset several 
>> counters at once. [...]

> It is probably a bug, but we cannot fix it due to the 
> way the CSS engine has been implemented.
> 
> A rule like:
> 
> foo {
>    bar: 1;
>    bar: 2;
>    bar: 3;
> }
> 
> is equivalent to:
> 
> foo {
>    bar: 3;
> }
> 
> because a rule is implemented as a set of properties (keyed by the name 
> of the property) and not as a list of properties.

I see. Maybe then this limitation of XXE would best be documented at the 
bottom of the "Restrictions" page (while I concede that it is not very 
likely that someone would actually look for it in that place when 
encountering the above problem):
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/restrict.html


> --> Now the actual workaround is easy, clean and conforming to the CSS 
> standard:
> 
> A:before
> {
>   display: block;
>   counter-increment: A-num;
>   content: element-local-name() " " counter(A-num, decimal);
>   counter-reset: B-num C-num; /*Reset *two* counters at once*/
> }
> 
> I've not tried it but I don't see why it wouldn't work.

You are right, this works perfectly well. Thank you for this hint. I 
should have studied the CSS specifications more closely...

   Yves

Reply via email to