@@ -406,6 +406,11 @@ <h3 id=common-serializing-idioms><span class=secno>2.3. </span>Common
406406 href ="#serialize-a-string " title ="serialize a string "> string escaped</ a >
407407 value of the given string, followed by "< code > )</ code > ".
408408
409+ < p > To < dfn id =serialize-a-comma-separated-list > serialize a comma-separated
410+ list</ dfn > concatenate all items of the list in list order while
411+ separating them by "< code > ,</ code > " (U+002C), followed by a space
412+ (U+0020).
413+
409414 < h2 id =media-queries > < span class =secno > 3. </ span > Media Queries</ h2 >
410415
411416 < p > < dfn id ="media queries "> Media queries</ dfn > are defined by the Media
@@ -436,21 +441,10 @@ <h3 id=serializing-media-queries><span class=secno>3.2. </span>Serializing
436441 Media Queries</ h3 >
437442
438443 < p > To < dfn id =serialize-a-list-of-media-queries > serialize a list of media
439- queries</ dfn > let < var title =""> s</ var > be the empty string, run the steps
440- below for each media query in the list of media queries, and finally
441- return < var title =""> s</ var > :
442-
443- < ol >
444- < li >
445- < p > Append the result of < a href ="#serialize-a-media-query "
446- title ="serialize a media query "> serializing</ a > the media query to < var
447- title =""> s</ var > .
448-
449- < li >
450- < p > If this is not the last media query in the list append
451- "< code > ,</ code > " (U+002C), followed by a space (U+0020), to < var
452- title =""> s</ var > .
453- </ ol >
444+ queries</ dfn > < a href ="#serialize-a-media-query " title ="serialize a media
445+ query "> serialize</ a > each media query in the list of media queries and
446+ then < a href ="#serialize-a-comma-separated-list " title ="serialize a
447+ comma-separated list "> serialize</ a > the list.
454448
455449 < p > To < dfn id =serialize-a-media-query > serialize a media query</ dfn > let
456450 < var title =""> s</ var > be the empty string, run the steps below, and
@@ -779,20 +773,10 @@ <h3 id=serializing-selectors><span class=secno>4.2. </span>Serializing
779773 <!-- http://dump.testsuite.org/2009/cssom/serializing-selectors.htm -->
780774
781775 < p > To < dfn id =serialize-a-group-of-selectors > serialize a group of
782- selectors</ dfn > let < var title =""> s</ var > be the empty string, run the
783- steps below for each selector in the group of selectors, and finally
784- return < var title =""> s</ var > :
785-
786- < ol >
787- < li >
788- < p > Append the result of < a href ="#serialize-a-selector " title ="serialize
789- a selector "> serializing</ a > the selector to < var title =""> s</ var > .
790-
791- < li >
792- < p > If the selector is not the last selector in the group of selectors
793- append "< code > ,</ code > " (U+002C), followed by a space (U+0020), to < var
794- title =""> s</ var > .
795- </ ol >
776+ selectors</ dfn > < a href ="#serialize-a-selector " title ="serialize a
777+ selector "> serialize</ a > each selector in the group of selectors and then
778+ < a href ="#serialize-a-comma-separated-list " title ="serialize a
779+ comma-separated list "> serialize</ a > the group.
796780
797781 < p > To < dfn id =serialize-a-selector > serialize a selector</ dfn > let < var
798782 title =""> s</ var > be the empty string, run the steps below for each part of
@@ -3585,36 +3569,24 @@ <h4 id=serializing-css-values><span class=secno>5.6.2. </span>Serializing
35853569 < dt > <counter>
35863570
35873571 < dd >
3588- < p > In case of nested counters with the same name the concatenation of
3589- these strings:</ p >
3572+ < p > The concatenation of:</ p >
35903573
35913574 < ol >
35923575 < li >
3593- < p > The string "< code title =""> counters(</ code > ", followed by the first
3594- <identifier> component, serialized, followed by "< code > ,</ code > "
3595- (U+002C), followed by a space (U+0020), followed by the <string>
3596- component, serialized.
3597-
3598- < li >
3599- < p > If there is a second < <identifier> component: "< code > ,</ code > "
3600- (U+002C), followed by a space (U+0020), followed by the second
3601- <identifier> component, serialized.
3576+ < p > If <counter> has three CSS value components the string "< code
3577+ title =""> counters(</ code > ".
36023578
36033579 < li >
3604- < p > "< code > )</ code > " (U+0029).
3605- </ ol >
3606-
3607- < p > Otherwise, the concatenation of these strings:</ p >
3608-
3609- < ol >
3610- < li >
3611- < p > The string "< code title =""> counter(</ code > ", followed by the first
3612- <identifier> component, serialized.
3580+ < p > If <counter> has two CSS value components the string "< code
3581+ title =""> counter(</ code > ".
36133582
36143583 < li >
3615- < p > If there is a second < <identifier> component: "< code > ,</ code > "
3616- (U+002C), followed by a space (U+0020), followed by the second
3617- <identifier> component, serialized.
3584+ < p > The result of < a href ="#serialize-a-comma-separated-list "
3585+ title ="serialize a comma-separated list "> serializing</ a > the < a
3586+ href ="#serialize-a-css-value-component " title ="serialize a CSS value
3587+ component "> serialized</ a > CSS value components belonging to
3588+ <counter> as list while omitting the last CSS value component if it
3589+ is 'decimal'.
36183590
36193591 < li >
36203592 < p > "< code > )</ code > " (U+0029).
@@ -3675,10 +3647,12 @@ <h4 id=serializing-css-values><span class=secno>5.6.2. </span>Serializing
36753647 < dt > <shape>
36763648
36773649 < dd >
3678- < p > The string "< code title =""> rect(</ code > ". Then for each CSS value
3679- component the component in serialized form, followed by "< code > ,</ code > "
3680- (U+002C) and a space (U+0020) unless the component is the last in which
3681- case follow it by "< code > )</ code > " (U+0029).
3650+ < p > The string "< code title =""> rect(</ code > ", followed by the result of < a
3651+ href ="#serialize-a-comma-separated-list " title ="serialize a
3652+ comma-separated list "> serializing</ a > the < a
3653+ href ="#serialize-a-css-value-component " title ="serialize a CSS value
3654+ component "> serialized</ a > CSS value components belonging to <shape>
3655+ as list, followed by "< code > )</ code > " (U+0029).
36823656
36833657 < dt > <string>
36843658
0 commit comments