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

Re: [css-counter-styles] question about API

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 17 Feb 2014 07:56:11 -0800
Message-ID: <CAAWBYDBM_gCV9DJFEv0d8bhMEa57xQ+gQmBnDkRpxRjZ8bbfKw@mail.gmail.com>
To: Reece Dunn <msclrhd@googlemail.com>
Cc: Xidorn Quan <quanxunzhen@gmail.com>, www-style list <www-style@w3.org>
On Mon, Feb 17, 2014 at 2:48 AM, Reece Dunn <msclrhd@googlemail.com> wrote:
> 1.  When setting the values, how are inter-connected values validated?
>
> 2.  What are the intended use cases of the getter API?

The intended use of the CSSOM API is just to reflect the rule as it
was written in the stylesheet, and allow modification of it from
script.

> Also note that the spec says for the properties that are not the name
> property: "The remaining attributes on getting must return a DOMString
> object that contains the serialization of the associated descriptor
> defined for the associated rule."
>
> This implies that this is the actual computed value, so
> "@counter-style a { system: cyclic; }" would return a range of
> "infinite infinite", not "auto" or null.
>
> Tab: Can you clarify that this is the intended behaviour and clarify
> the wording in the spec?

There are no "computed values" in at-rules like this - that's a
concept that only exists for property values.  Counter styles have an
*abstract* range, which is filled in by the 'range' descriptor and the
default behavior of the system.

In your example, asking for the 'range' descriptor would return "", as
it's not specified.

~TJ
Received on Monday, 17 February 2014 15:56:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC