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

Re: [css-counter-styles] About override loop

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 21 Feb 2014 12:52:31 -0800
Message-ID: <CAAWBYDBXcdzbbUUD8PH7uUooDBqu7C7CBDB+GPtcYg6-vAjNfA@mail.gmail.com>
To: Xidorn Quan <quanxunzhen@gmail.com>
Cc: www-style list <www-style@w3.org>
On Mon, Feb 17, 2014 at 4:12 AM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
> On Mon, Feb 17, 2014 at 8:23 PM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
>> The current draft doesn't discuss what will happen if there is an
>> override loop. However, it is obvious that all styles in an override
>> loop should actually override 'decimal', like those override a
>> nonexistent style. I just think it is better to mention such case in
>> the spec.
>
> After doing some thinking, I propose that only the descriptor which is
> unspecified in all styles in the cycle should fall to 'decimal'.
>
> For example, if there is three styles: A, B, and C:
>
> @counter-style A { system: override B; negative: A; }
> @counter-style B { system: override C; prefix: B; }
> @counter-style C { system: override A; suffix: C; }
>
> Then all three styles should use 'A' for 'negative', 'B' for 'prefix',
> and 'C' for 'suffix', and other descriptors will inherent the value of
> 'decimal'.

Hm, I think that's more trouble than it's worth.  The cycle is an
error in the first place; we *could* try to patch things up and do a
minimal amount of failure, but I'd rather just make the entire thing
fail in a more obvious fashion.

~TJ
Received on Friday, 21 February 2014 20:53:21 UTC

This archive was generated by hypermail 2.3.1 : Friday, 21 February 2014 20:53:21 UTC