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

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

From: Rune Lillesveen <rune@opera.com>
Date: Mon, 24 Jun 2013 14:17:12 +0200
To: "www-style list" <www-style@w3.org>
Message-ID: <op.wy6m2ygt8isf1p@rune-optiplex-980>
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 12:17:43 UTC

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