W3C home > Mailing lists > Public > www-style@w3.org > June 2012

[css3-page][css3-lists] Implicit Counter Increments

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 12 Jun 2012 15:46:22 -0700
Message-ID: <4FD7C6BE.2090309@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
Splitting out this portion of the thread from http://www.w3.org/mid/4FD73933.9020404@kozea.fr ...

Basically the the topic is implicit counter increments and resets.
List items and pages do this in Level 3: list items automatically
increment the 'list-item' counter, and pages automatically increment
the 'page' counter. The question is, how does that interact with
other counter-increment declarations.

Simon Sapin wrote:
> fantasai wrote:
>> Simon Sapin wrote:
>>>
>>> Maybe we want the page counter to behave the same as the list-item counter in the latest Lists 3 editorís draft: the implicit
>>> increment only happens if the counter-increment is not otherwise specified. This can be implemented with an 'auto' initial
>>> value, for counter-increment but that value should serialize to 'none' (the real initial value in CSS 2.1) when authors
>>> request the computed value.
>>
>> Either that, or 'none' is really 'auto', and to turn off an implicit counter,
>> you have to specify it explicitly.
>
> Rephrased: 'counter-increment: foo' and 'counter-increment: none' can both increment the 'list-item' or 'page' counter. The only way to inhibit this to explicitly use this counter name:
> 'counter-increment: page 0'
>
> Is this what you mean?

Yes, that's what I mean. :) In your example
   @page figures { counter-increment: figure-pages }
it means that the implicit 'page' counter is still incremented.

> I guess it could work too. Actually I like it better than the alternatives.

I think I do, too. It's unlikely someone wants to suppress these implicit counters,
but likely they want to fiddle with making additional counters, so requiring any
implicit counters to be explicitly manipulated seems like a good idea.

>> I'll have to escalate that suggestion up to the WG, since we'll have to coordinate
>> with css3-content and css3-lists. Filed as ISSUE-257
>>     https://www.w3.org/Style/CSS/Tracker/issues/257

~fantasai
Received on Tuesday, 12 June 2012 22:46:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT