Re: [cssom][css3-values] Serialization of initial from shorthand

On Mon, Jun 24, 2013 at 10:00 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Mon, Jun 24, 2013 at 7:14 AM, Glenn Adams <glenn@skynav.com> wrote:
> > In the first case, I would expect "center" returned, and in the second, I
> > would expect "initial" returned: because these are specified values.
>
> Is that specified?  If so, then "initial" shouldn't be returned, as it
> disappears by specified-value time.
>

Sorry, but I was using "specified" in the general sense, as in exactly what
was specified explicitly, and not what CSS refers to as as "specified
values" in the CSS Cascade [1].

Unfortunately [1] invents something for "specified" which doesn't mean
specified. I've often thought this a mistake, and an endless source of
confusion.

Of particular relevance here is the following NOTE in DOM-2 Style [2]:

*Note:* The CSS Object Model doesn't provide an access to the
*specified*<http://www.w3.org/TR/1998/REC-CSS2-19980512/cascade.html#specified-value>
 or *actual*<http://www.w3.org/TR/1998/REC-CSS2-19980512/cascade.html#specified-value>
values
of the CSS cascade.

So, except for getComputedStyle(...).propertyName, which returns the
computed value, what is returned by elt.style.propertyName should be
exactly what was specified in the style attribute, and not the CSS Cascade
notion of "specified value".

[1] http://www.w3.org/TR/CSS2/cascade.html#specified-value
[2] http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration

Received on Monday, 24 June 2013 18:44:51 UTC