cssom/cssom-source

changeset 6527
cee171486069
parent 6524
c29b701c9eea
child 6528
8ff9876ee38b
     1.1 --- a/cssom/cssom-source	Mon Aug 20 20:05:30 2012 -0700
     1.2 +++ b/cssom/cssom-source	Tue Aug 21 11:48:04 2012 +0800
     1.3 @@ -1463,11 +1463,34 @@
     1.4    <dfn id="parse-a-css-declaration-block">parse a CSS declaration block</dfn>
     1.5    ...</p>
     1.6  
     1.7 -  <p class="issue">To
     1.8 -  <dfn id="serialize-a-css-declaration-block">serialize a CSS declaration block</dfn>
     1.9 -  ...</p>
    1.10 +  <p>To <dfn id="serialize-a-css-declaration-block">serialize a CSS declaration block</dfn>
    1.11 +  represented by a <code>CSSStyleDeclarations</code> instance named <var>d</var>,
    1.12 +  let <var>s</var> be the empty string, then run the steps below:</p>
    1.13  
    1.14 +  <ol>
    1.15 +    <li><p>If <code><var>d</var>.length</code> is zero (0), then return <var>s</var>.</p></li>
    1.16 +    <li><p>For each <var>i</var> from zero (0) through <code><var>d</var>.length</code> - 1 (inclusive), perform the following sub-steps:</p>
    1.17 +    <ol>
    1.18 +      <li><p>Let <var>n</var> be the value returned by <code><var>d</var>.item(<var>i</var>)</code>.</p></li>
    1.19 +      <li><p>Let <var>v</var> be the value returned by <code><var>d</var>.getPropertyValue(<var>n</var>)</code>.</p></li>
    1.20 +      <li><p>If <var>v</var> is the empty string, then continue.</p></li>
    1.21 +      <li><p>Otherwise (<var>v</var> is non-empty), perform the following sub-steps:</p>
    1.22 +          <ol>
    1.23 +            <li><p>If <var>s</var> is not empty, then append a SPACE (U+0020) to <var>s</var>.</p></li>
    1.24 +            <li><p>Append <var>n</var> to <var>s</var>.</p></li>
    1.25 +            <li><p>Append COLON (U+003A) followed by SPACE (U+0020, i.e., "<code>: </code>", to <var>s</var>.</p></li>
    1.26 +            <li><p>Append <var>v</var> to <var>s</var>.</p></li>
    1.27 +            <li><p>Append SEMICOLON (U+003B), i.e., "<code>;</code>", to <var>s</var>.</p></li>
    1.28 +          </ol>
    1.29 +      </li>
    1.30 +    </ol>
    1.31 +    </li>
    1.32 +  </ol>
    1.33  
    1.34 +  <p class="note">The serialization of an empty CSS declaration block is the empty string.</p>
    1.35 +
    1.36 +  <p class="note">The serialization of an non-empty CSS declaration block does not including any surrounding whitespace, i.e., no whitepsace
    1.37 +  before the first property name and no whitespace after the final semicolon delimiter that follows the last property value..</p>
    1.38  
    1.39    <!-- ........................................................................................................................ -->
    1.40  

mercurial