Nested counters and cross references


I’d like to nest ordered lists and reference list items in other places (common use-case in contract documents).

  <li>first level</li>
    first level:
      <li>second level</li>
      <li id="ref">second level</li>
<a href="#ref">This is a reference to </a>

ol {
  counter-reset: item;

li {
  list-style-type: none;
  counter-increment: item;

li:before {
  content: counters(item, '.') ' ';

a:after {
  content: target-counters(attr(href), item, '.');

Unfortunately this won’t work with pagedjs (see
Is there a way to achieve this with CSS and pagedjs, or do I have to do my own counters in JS?
Do you plan to support nesting with counters() and target-counters() in the near future?

Thank you for all the hard work with such a great lib.