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

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

From: Glenn Adams <glenn@skynav.com>
Date: Mon, 24 Jun 2013 23:14:09 +0900
Message-ID: <CACQ=j+eLWf8FCEiibut9aW=eaDTMMapWsRnQZQt46+74wnidHg@mail.gmail.com>
To: Rune Lillesveen <rune@opera.com>
Cc: www-style list <www-style@w3.org>
In the first case, I would expect "center" returned, and in the second, I
would expect "initial" returned: because these are specified values.


On Mon, Jun 24, 2013 at 9:17 PM, Rune Lillesveen <rune@opera.com> wrote:

> When you serialize properties which have been set to its initial value by
> a shorthand, and the UA supports the 'initial' keyword, should the
> serialization use the 'initial' keyword or the actual initial value?
>
> Example:
>
> <style>
>   p {
>     background-position: center;
>     background: blue;
>   }
> </style>
> <script>
>   alert(document.styleSheets[0].**cssRules[0].style.**backgroundPosition);
> </script>
>
> Output "0% 0%" or "initial"?
>
>
> Also, is an explicit use of 'initial' different?:
>
> <style>
>   p {
>     background-position: initial;
>   }
> </style>
> <script>
>   alert(document.styleSheets[0].**cssRules[0].style.**backgroundPosition);
> </script>
>
> Output "0% 0%" or "initial"?
>
>
> --
> Rune Lillesveen
>
>
Received on Monday, 24 June 2013 14:14:59 UTC

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