Skip to content

Commit 9d44fe1

Browse files
author
Simon Pieters
committed
[cssom] Use the serializer rules for <an+b> specified in css-syntax. http://www.w3.org/mid/20130608071437.GA3958@crum.dbaron.org
1 parent ce7944f commit 9d44fe1

2 files changed

Lines changed: 4 additions & 74 deletions

File tree

cssom/Overview.html

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -797,43 +797,8 @@ <h3 id="serializing-selectors"><span class="secno">5.2 </span>Serializing Select
797797
<dt><code title="">:nth-last-child()</code></dt>
798798
<dt><code title="">:nth-of-type()</code></dt>
799799
<dt><code title="">:nth-last-of-type()</code></dt>
800-
<dd>
801-
<ol>
802-
<li><p>If the value is odd let the value be
803-
"<code title="">2n+1</code>".</li>
804-
805-
<li><p>If the value is even let the value be
806-
"<code title="">2n</code>".</li>
807-
808-
<li><p>If <var>a</var> is zero let the value be
809-
<var>b</var>
810-
<a href="#serialize-a-css-component-value" title="serialize a CSS component value">serialized</a> as &lt;integer&gt;.</li>
811-
812-
<li><p>If <var>a</var> is one or minus one and
813-
<var>b</var> is zero let the value be
814-
"<code title="">n</code>" (U+006E).</li>
815-
816-
<li><p>If <var>a</var> is one or minus one let the value be
817-
"<code title="">n</code>" (U+006E), followed by
818-
"<code title="">+</code>" (U+002B) if <var>b</var> is positive,
819-
followed by <var>b</var>
820-
<a href="#serialize-a-css-component-value" title="serialize a CSS component value">serialized</a> as &lt;integer&gt;.</li>
821-
822-
<li><p>If <var>b</var> is zero let the value be
823-
<var>a</var>
824-
<a href="#serialize-a-css-component-value" title="serialize a CSS component value">serialized</a> as &lt;integer&gt;,
825-
followed by "<code title="">n</code>" (U+006E).</li>
826-
827-
<li><p>Otherwise let the value be
828-
<var>a</var>
829-
<a href="#serialize-a-css-component-value" title="serialize a CSS component value">serialized</a> as &lt;integer&gt;,
830-
followed by "<code title="">n</code>" (U+006E), followed by
831-
"<code title="">+</code>" (U+002B) if <var>b</var> is positive,
832-
followed by <var>b</var>
833-
<a href="#serialize-a-css-component-value" title="serialize a CSS component value">serialized</a> as &lt;integer&gt;.</li>
834-
</ol>
835-
</dd>
836-
800+
<dd><p>The result of serializing the value using the rules for <a class="external" data-anolis-spec="csssyntax" href="http://dev.w3.org/csswg/css-syntax/#serializing-anb">serializing &lt;an+b&gt;</a>.
801+
837802
<dt><code title="">:not()</code></dt>
838803
<dd><p>The result of serializing the value using the rules for
839804
<a href="#serialize-a-group-of-selectors" title="serialize a group of selectors">serializing a group of selectors</a>.</dd>

cssom/Overview.src.html

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -720,43 +720,8 @@ <h3>Serializing Selectors</h3>
720720
<dt><code title>:nth-last-child()</code></dt>
721721
<dt><code title>:nth-of-type()</code></dt>
722722
<dt><code title>:nth-last-of-type()</code></dt>
723-
<dd>
724-
<ol>
725-
<li><p>If the value is odd let the value be
726-
"<code title>2n+1</code>".</p></li>
727-
728-
<li><p>If the value is even let the value be
729-
"<code title>2n</code>".</p></li>
730-
731-
<li><p>If <var>a</var> is zero let the value be
732-
<var>b</var>
733-
<span title="serialize a CSS component value">serialized</span> as &lt;integer>.</p></li>
734-
735-
<li><p>If <var>a</var> is one or minus one and
736-
<var>b</var> is zero let the value be
737-
"<code title>n</code>" (U+006E).</p></li>
738-
739-
<li><p>If <var>a</var> is one or minus one let the value be
740-
"<code title>n</code>" (U+006E), followed by
741-
"<code title>+</code>" (U+002B) if <var>b</var> is positive,
742-
followed by <var>b</var>
743-
<span title="serialize a CSS component value">serialized</span> as &lt;integer>.</p></li>
744-
745-
<li><p>If <var>b</var> is zero let the value be
746-
<var>a</var>
747-
<span title="serialize a CSS component value">serialized</span> as &lt;integer>,
748-
followed by "<code title>n</code>" (U+006E).</p></li>
749-
750-
<li><p>Otherwise let the value be
751-
<var>a</var>
752-
<span title="serialize a CSS component value">serialized</span> as &lt;integer>,
753-
followed by "<code title>n</code>" (U+006E), followed by
754-
"<code title>+</code>" (U+002B) if <var>b</var> is positive,
755-
followed by <var>b</var>
756-
<span title="serialize a CSS component value">serialized</span> as &lt;integer>.</p></li>
757-
</ol>
758-
</dd>
759-
723+
<dd><p>The result of serializing the value using the rules for <span data-anolis-spec=csssyntax>serializing &lt;an+b></span>.
724+
760725
<dt><code title>:not()</code></dt>
761726
<dd><p>The result of serializing the value using the rules for
762727
<span title="serialize a group of selectors">serializing a group of selectors</span>.</p></dd>

0 commit comments

Comments
 (0)