-
Notifications
You must be signed in to change notification settings - Fork 756
Description
(migrated from first half of #3520 to make a single point per issue, and updated)
css-page-3 has the following language:
If a counter is reset or incremented within the page context, it is in scope for all page-margin boxes and obscures all counters of the same name within the document.
This implies the counter falls out of scope at the end of the page context - which means a counter incremented in the page context cannot be referenced from within the document body, or indeed within another page context. This clearly isn't the intention, otherwise counter-increment: page in the page context couldn't work.
A qualifier was suggested when this was first raised by @fantasai, but it seems to have eroded over time.
I think the intended meaning is if a counter is incremented for the first time - because incrementing any counter without a previous reset will create a new counter.
Should this instead read "if a counter is created within the page context"?
"Created" is the specific term used in css-lists for when a counter is reset or set/incremented without a previous reset. With an implied user-agent rule of
:root { counter-reset: page 0 }then the "page" counter is not being created in the margins, so can be shared across the whole document.