Forum Bugs

Changed target-counter scope with prince 8.0

pestafo
Hi

The following code worked fine with Prince 7.1 but does no longer work with Prince 8.0.

The expected result is:

Ref. 1[1]
[1] Bookmark 1
Ref. 2[2]
[2] Bookmark 2

When i remove the two DIVs the result is as expected.
Has this something to do with 'Release Notes 8.0: Fixed bug where counter scopes were incorrectly extended outside of parent elements.' ? If so, how can I control the reset of my counter beyond parent elements?

<html>
  <head>
    <title>Factsheet</title>
    <style type="text/css">
	
.element-footnote {
  counter-increment: enote;
}

.element-footnote::before {
  content: "[" counter(enote, decimal) "] ";
}

[a]::after {
  content: "[" target-counter(attr(a), enote, decimal) "]";
}

</style>
  </head>
  <body>
	<div>
		<p a="#Bookmark1">Ref. 1</p>
		<p class="element-footnote" id="Bookmark1">Bookmark 1</p>
	</div>
	<div>
		<p a="#Bookmark2">Ref. 2</p>
		<p class="element-footnote" id="Bookmark2">Bookmark 2</p>
	</div>
  </body>
</html>
pestafo
I found an easy solution. By adding a 'counter-reset:<counter-name>;' to the body element it seems to work like it did in Prince 7.1.