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

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