[csswg-drafts] [css-page-3] page context counter scopes are described incorrectly (#4759)

faceless2 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-page-3] page context counter scopes are described incorrectly  ==
(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](https://lists.w3.org/Archives/Public/www-style/2009Apr/0368.html) 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
```css
:root { counter-reset: page 0 }
```
then the "page" counter is not being created in the margins, so can be shared across the whole document.






Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4759 using your GitHub account

Received on Friday, 7 February 2020 18:55:28 UTC