Re: [css3-page] page counters and scope

Grant, Melinda wrote:
>
>>
>> <div style="counter-reset: foo">
>>    <span style="content: counter(foo);"/>
>>    <div style="height: 2em;">
>>      Lots of content that spills across 3 pages
>>    </div>
>>    <span style="content: counter(foo);"/> </div>
>>
>> Where both spans fall on the first page.
> 
> I guess the first question is what the 'correct' value for the
> span counter under the overflow should be. Assuming the snippet
> commences on page 1 (and is all in normal flow), I would
> intuitively expect the second span counter to say '1', since
> we're counting pages.  (Even though in terms of document order,
> it comes after content that may be on page 3.)
> 
> Other opinions?

Mine is, this case should be undefined because different
implementations have different internal pagination structures
and this case is so wacky that I'd prefer letting implementors
use the easy way out for their implementation. :)

>>>>    3. Copy counters in scope at all break points, in document order,
>>>>       into the @page counter scope, obscuring any counters of the same name
>>>>       there. (In CSS3, this step is not required.)
>>> Presumably you mean just page counters here and below in #4...?
>> No, I mean document counters here and in #4.
> 
> Hmm, let me rephrase.  I assume you mean document counters which
> are reset or incremented within a page context, and not all
> document counters?

No, all counters--we want to access e.g. chapter number counters,
right? :)

>>> I find 'all break points' a bit confusing...  I don't think 
>> you mean 
>>> all page break points, so I assume you must mean the point 
>> where each 
>>> element breaks?  Does my following rewording attempt 
>> capture your intent?
>>> 	3. Copy all counters manipulated within page contexts 
>> that are in 
>>> scope for any element split by the page break, in document 
>> order, ...?
>>
>> Yeah, except the in document order part. If an element breaks 
>> in two places at this page break, we want the counter values 
>> from the second break.
> 
> OK, I was trying to better understand what you're proposing for #3.  Your initial proposal was:
>> 	3. Copy counters in scope at all break points, in document order, into the @page counter scope, 
>> obscuring any counters of the same name there. (In CSS3, this step is not required.)
> 
> I asked if the following was equivalent (or tried to):
> 	3. Copy all counters manipulated within page contexts that are in scope for any element split by the page break, in document order, into the @page counter scope, obscuring any counters of the same name there.  (In CSS3, this step is not required.)
> 
> So I'm confused now when you say "except for the in document order
> part."  Are you suggesting a change to your original proposal?
> How would you determine which element split point is the second if
> not by document order?  And I thought your initial proposal said
> that we wanted all the counters from all the element split points,
> not just the second or last...?

Ummmm, yeah, you're right. "In document order" would work. :)

~fantasai

Received on Friday, 24 April 2009 04:01:03 UTC