Forum Bugs

counter-reset: footnotes breaks reset of other counters

yet
Our HTML documents have classes .l1, .l2 etc. indicating the hierarchy of the document. Generating the section counters etc. works perfectly.


302 .l1 {
303 counter-increment: c1;
304 counter-reset: c2;
305 }
306
307 .l2 {
308 counter-increment: c2;
309 counter-reset: c3;
310 }
311
312 .l3 {
313 counter-increment: c3;
314 counter-reset: c4;
315 }
316
317 .l4 {
318 counter-increment: c4;
319 counter-reset: c5;
320 }


I tried adding the following rule for reseting the footnote counter for each chapter:

322 .l1 {
323 counter-reset: footnote;
324 }

As a result: the 'c2' counter is no longer being reseted with the start of a new chapter.
(I can provide HTML + CSS if necessary).

Using Prince 7.0 on MacOSX
mikeday
This is the way the CSS cascade works: for each element, exactly one value will "win" for each property. Most of the time this is what you want, eg. it doesn't make sense to have two different colors or font-styles for the same element. However, it does result in this awkward situation for the counter properties, where they clash instead of combining. The only solution at present is to add another rule that sets both counters simultaneously.
yet
mikeday wrote:
This is the way the CSS cascade works: for each element, exactly one value will "win" for each property. Most of the time this is what you want, eg. it doesn't make sense to have two different colors or font-styles for the same element. However, it does result in this awkward situation for the counter properties, where they clash instead of combining. The only solution at present is to add another rule that sets both counters simultaneously.


huh?

Where is a clash here? Even merging the both .l1 rules into one causes the same problem. I really don't see what you mean?!
mikeday
How about using a rule like this:
.l1 {
    counter-increment: c1;
    counter-reset: c2 footnote;
}
yet
mikeday wrote:
How about using a rule like this:
.l1 {
    counter-increment: c1;
    counter-reset: c2 footnote;
}


Of course you are right (as always). I really appreciate your great support.