# HG changeset patch # User Glenn Adams # Date 1349065075 -28800 # Node ID 0d2a6c814dd1e33b04a00c95651217c51d5d3819 # Parent b91a64fff4573fb875a0a1bc92badcd906d5f52d [cssom] first draft of color serialization rules diff -r b91a64fff457 -r 0d2a6c814dd1 cssom/Overview.html --- a/cssom/Overview.html Sun Sep 30 16:27:02 2012 +0900 +++ b/cssom/Overview.html Mon Oct 01 12:17:55 2012 +0800 @@ -18,7 +18,7 @@ -

Editor's Draft 27 September 2012

+

Editor's Draft 1 October 2012

@@ -83,7 +83,7 @@ can be found in the W3C technical reports index at http://www.w3.org/TR/. -

This is the 27 September 2012 Editor's Draft of CSSOM. Please send comments to +

This is the 1 October 2012 Editor's Draft of CSSOM. Please send comments to www-style@w3.org (archived) with [cssom] at the start of the subject line. @@ -2072,7 +2072,47 @@ the literal string "deg".

<color>
-

preserve system colors, maybe color keywords...

+
+

If <color> is a component of a resolved or computed value, then + return the color using the rgb() or rgba() functional + notation as follows:

+
    +
  1. If the alpha component of the color is equal to one, then return the serialization of the + rgb() functional equivalent of the opaque color.
  2. +
  3. If the alpha component of the color is not equal to one, then return the serialization of the + rgba() functional equivalent of the non-opaque color.
  4. +
+

The serialization of the rgb() functional equivalent is the concatenation of the following:

+
    +
  1. The string "rgb(".
  2. +
  3. The shortest base-ten integer serialization of the red value.
  4. +
  5. The string ", ".
  6. +
  7. The shortest base-ten serialization of the green value.
  8. +
  9. The string ", ".
  10. +
  11. The shortest base-ten serialization of the blue value.
  12. +
  13. The string ")".
  14. +
+

The serialization of the rgba() functional equivalent is the concatenation of the following:

+
    +
  1. The string "rgba(".
  2. +
  3. The shortest base-ten serialization of the red value.
  4. +
  5. The string ", ".
  6. +
  7. The shortest base-ten serialization of the green value.
  8. +
  9. The string ", ".
  10. +
  11. The shortest base-ten serialization of the blue value.
  12. +
  13. The string ", ".
  14. +
  15. The shortest serialization of the <number> that denotes the alpha value.
  16. +
  17. The string ")".
  18. +
+ +

If <color> is a component of a specified value, then + return the color as follows:

+
    +
  1. If the color was explicitly specified by the author, then return the original, author specified color value.
  2. +
  3. Otherwise, return the value that would be returned if the color were a component of a computed value.
  4. +
+

Should author specified values be normalized for case? Or should original case be preserved?

+