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

Re: [cssom][css-cascade] Access to specified or cascaded values in OM?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 27 Jun 2013 11:01:30 -0700
Message-ID: <CAAWBYDCB=S=ZfGGrJJZ-sG=4MA5xEB08eQ48KawqqqhBskNvuQ@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: www-style list <www-style@w3.org>
On Mon, Jun 24, 2013 at 3:30 PM, L. David Baron <dbaron@dbaron.org> wrote:
> On Monday 2013-06-24 14:16 -0700, Tab Atkins Jr. wrote:
>> The term "specified value" has always been confusing, because it does
>> *not* refer to the value the author specified.  Instead, it's always
>> referred to the value that starts the standard value-computation
>> chain, at the point where a given element has a value for every
>> property.
>>
>> Ironically, we don't actually *have* a term for the value the author
>> actually specified in the stylesheet, or the close-enough concept of
>> what CSSStyleDeclaration returns.
>>
>> Private conversation with dbaron (in #css) led to the following suggestions:
>>
>> 1. Use "declared value" for the value of a declaration; that is, what
>> is returned when you query CSSStyleDeclaration.  This is not
>> associated with any particular element, and may not have a value for
>> every property.
>>
>> 2. Drop the term "specified value", and slightly modify Cascade so
>> that "cascaded value" fills the role.  This just requires us to
>> slightly change the verbiage around how we handle the global keywords;
>> currently, the "cascaded value" may be empty or resolve to one of the
>> global keywords.  We'd change it so that as part of the computation of
>> the cascaded value, we guarantee that we fill in a value, and resolve
>> away the global keywords.  (Our current use of "cascaded value" in the
>> spec is unobservable from the outside, and we can just lean on the
>> term "result of the cascade" to represent the value that might be
>> empty or might be a global keyword.)
>
> One further issue is what
> http://dev.w3.org/csswg/cssom/#getstyleutils should specify access
> to.
>
> Do authors want access to cascaded values (sometimes empty, and with
> 'initial' and 'inherit' as they are) or specified values (with
> 'initial' and 'inherit' resolved and any empty values replaced with
> the inherited or initial value)?  I don't recall the use cases here
> to recall which is useful (one, both, or neither).

I've posted a call for opinions on my blog: http://www.xanthir.com/b4Qi0

~TJ
Received on Thursday, 27 June 2013 18:02:17 UTC

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