Hi,
We have a use-case where we want to reset the page counter if a HTML element in the content of the document is found. The problem is that we don't want to generate a page break when the counter-reset is performed. Does Price support something similar directly from CSS without falling back to some javascript implementation ?
I've tried to break-before:avoid for counter resetting html element as well as break-after:avoid on the preceding html element, including a combination of both but the counter-reseting element is rendered on a new page.
Thanks in advance.
Example CSS:
We have a use-case where we want to reset the page counter if a HTML element in the content of the document is found. The problem is that we don't want to generate a page break when the counter-reset is performed. Does Price support something similar directly from CSS without falling back to some javascript implementation ?
I've tried to break-before:avoid for counter resetting html element as well as break-after:avoid on the preceding html element, including a combination of both but the counter-reseting element is rendered on a new page.
Thanks in advance.
Example CSS:
/* This section always precedes level1 checklist */
.arc-unit[data-unit-family='tocable'][data-ordinal-level='section'] {
break-after: avoid
}
.arc-unit[data-unit-family='tocable'][data-ordinal-level='level1'][data-subtype='checklist'] {
break-before: avoid
}
.arc-unit[data-unit-family='tocable'][data-ordinal-level='level1'][data-subtype='checklist'] {
counter-reset: page 1 pages 1
}