W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [css-counter-styles] range of a counter style

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 20 Feb 2013 14:55:54 -0800
Message-ID: <CAAWBYDD=qu43z=2GbCn3KxAKP=ktHAq3ZFfZfFduMseg938PnA@mail.gmail.com>
To: Peter Moulder <peter.moulder@monash.edu>, www-style list <www-style@w3.org>
On Wed, Feb 20, 2013 at 4:17 AM, Peter Moulder <peter.moulder@monash.edu> wrote:
> The spec is currently a bit woolly (or indeed contradictory) as to whether
> the range of a counter style is exactly the union of the ranges given in the
> 'range' descriptor, or whether it's influenced by the 'system' of the counter
> style.  Similarly for the related concepts of what values a counter style is
> defined over, or what values cause fallback.
>
>
> In the list of steps in section 2, the first step is:
>
>   # If the counter value is outside the _range_ of the counter style
>   # [then use fallback; otherwise don't use fallback].
>
> where "range" is a link to a rather non-normative-looking definition:
>
>   # Counter styles are composed of:
>   #    ...
>   #    - a <dfn id="range">range</dfn>, which limits the
>   #      values that a counter style handles
>
> This doesn't actually help in deciding how to perform that first step.  I think
> that this list of steps should be clearly marked as to whether it is normative
> or not.  If it is normative, then I believe that range should link to a
> normative definition of what the range of a counter style is, or rather should
> link to some text that allows deciding whether a given counter value is outside
> the range of a given counter style, and thus whether or not to use the fallback.

I've linked that to the 'range' descriptor instead.

> If we look to section 3.5 for the definition of the 'range' descriptor,
> then it says:
>
>   # The ‘range’ descriptor defines the ranges over which the counter style is
>   # defined.  If a counter style is used to represent a counter value outside of
>   # its ranges, the counter style instead drops down to its fallback counter
>   # style.
>   # ...
>   # The range of the counter style is the union of all the ranges defined in
>   # the list.
>
> Also relevant to these concepts are that some systems aren't defined for all
> counter values (e.g. their algorithm doesn't say what to produce for all
> counter values, even if we take the negation rule as applying); and that the
> non-normative-looking description of fallback in section 2 describes it as what
> to use "when the counter value is outside the counter style's range or the
> counter style otherwise can't render the counter value".
>
> I suggest that each system description include a sentence saying what values
> it's defined over, and being clear as to whether this means what absolute
> values it's defined over or what original counter values it's defined over.
>
> Then the fallback clause (or the definition of "range of a counter") can refer
> to that concept.

No system has any intrinsic limits on what it can support.

> A couple minor issues in nomenclature: (i) sometimes "range" is used in the
> spec to mean a contiguous range, and sometimes to a union of contiguous ranges
> (though see following post);

A single contiguous range (pair of bounds) is only ever referred to in
the description of the 'range' descriptor, if I've done things
correctly.  Otherwise, the term just refers to the numbers the style
is defined over, with no reference to whether it's contiguous or not.

> (ii) mathematically speaking, one might say that
> it's the domain rather than range of the function.  ("Range" does make sense
> mathematically if one considers the function to be an identity function, but
> that seems a bit questionable for some counter styles.)  I've no real
> objections to either of these, they're just things you might wish to
> address at the same time as the other things mentioned here.

I believe "range" is an appropriate term, using its English definition.

~TJ
Received on Wednesday, 20 February 2013 22:56:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:06 GMT