@@ -1859,11 +1859,34 @@ <h3 id="css-declaration-blocks"><span class="secno">6.5 </span>CSS Declaration B
18591859 < dfn id ="parse-a-css-declaration-block "> parse a CSS declaration block</ dfn >
18601860 ...</ p >
18611861
1862- < p class ="issue "> To
1863- < dfn id ="serialize-a-css-declaration-block "> serialize a CSS declaration block</ dfn >
1864- ...</ p >
1862+ < p > To < dfn id ="serialize-a-css-declaration-block "> serialize a CSS declaration block</ dfn >
1863+ represented by a < code > CSSStyleDeclarations</ code > instance named < var > d</ var > ,
1864+ let < var > s</ var > be the empty string, then run the steps below:</ p >
1865+
1866+ < ol >
1867+ < li > < p > If < code > < var > d</ var > .length</ code > is zero (0), then return < var > s</ var > .</ li >
1868+ < 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 >
1869+ < ol >
1870+ < li > < p > Let < var > n</ var > be the value returned by < code > < var > d</ var > .item(< var > i</ var > )</ code > .</ li >
1871+ < li > < p > Let < var > v</ var > be the value returned by < code > < var > d</ var > .getPropertyValue(< var > n</ var > )</ code > .</ li >
1872+ < li > < p > If < var > v</ var > is the empty string, then continue.</ li >
1873+ < li > < p > Otherwise (< var > v</ var > is non-empty), perform the following sub-steps:</ p >
1874+ < ol >
1875+ < li > < p > If < var > s</ var > is not empty, then append a SPACE (U+0020) to < var > s</ var > .</ li >
1876+ < li > < p > Append < var > n</ var > to < var > s</ var > .</ li >
1877+ < li > < p > Append COLON (U+003A) followed by SPACE (U+0020, i.e., "< code > : </ code > ", to < var > s</ var > .</ li >
1878+ < li > < p > Append < var > v</ var > to < var > s</ var > .</ li >
1879+ < li > < p > Append SEMICOLON (U+003B), i.e., "< code > ;</ code > ", to < var > s</ var > .</ li >
1880+ </ ol >
1881+ </ li >
1882+ </ ol >
1883+ </ li >
1884+ </ ol >
18651885
1886+ < p class ="note "> The serialization of an empty CSS declaration block is the empty string.</ p >
18661887
1888+ < p class ="note "> The serialization of an non-empty CSS declaration block does not including any surrounding whitespace, i.e., no whitepsace
1889+ before the first property name and no whitespace after the final semicolon delimiter that follows the last property value..</ p >
18671890
18681891 <!-- ........................................................................................................................ -->
18691892
@@ -1898,7 +1921,7 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
18981921< dt class ="method " id ="widl-CSSStyleDeclaration-item-DOMString-unsigned-long-index ">
18991922< code > item</ code > (< span class ="idlParam "> < span class ="idlParamType "> < a > unsigned long</ a > </ span > </ span > ), returns < span class ="idlMethType "> < a > DOMString</ a > </ span > </ dt >
19001923< dd >
1901- < p > The < code > item</ code > operation must return the property at position < var > index</ var > .</ dd >
1924+ < p > The < code > item</ code > operation must return the name of the property at position < var > index</ var > .</ dd >
19021925< dt class ="method " id ="widl-CSSStyleDeclaration-getPropertyValue-DOMString-DOMString-property ">
19031926< code > getPropertyValue</ code > (< span class ="idlParam "> < span class ="idlParamType "> < a > DOMString</ a > </ span > </ span > ), returns < span class ="idlMethType "> < a > DOMString</ a > </ span > </ dt >
19041927< dd >
0 commit comments