Skip to content

Commit ad0d0e5

Browse files
committed
[css-syntax] Add some examples for <An+B>
1 parent 16beb36 commit ad0d0e5

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

css-syntax/Overview.bs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2607,7 +2607,10 @@ The <var>An+B</var> microsyntax</h2>
26072607

26082608
<div class="example">
26092609
<p>Example:
2610-
<pre>-n+6 /* represents the first 6 elements of the list */</pre>
2610+
<pre><!--
2611+
-->-1n+6 /* represents the first 6 elements of the list */&#xa;<!--
2612+
-->-4n+10 /* represents the 2nd, 6th, and 10th elements of the list */
2613+
</pre>
26112614
</div>
26122615

26132616
If both <var>A</var> and <var>B</var> are 0,
@@ -2674,6 +2677,15 @@ Informal Syntax Description</h3>
26742677
-->+ 2</pre>
26752678
</div>
26762679

2680+
When B is negative, its minus sign replaces the ''+'' sign.
2681+
2682+
<div class="example">
2683+
<p>Valid example:
2684+
<pre>3n-6</pre>
2685+
<p>Invalid example:
2686+
<pre>3n + -6</pre>
2687+
</div>
2688+
26772689

26782690
<h3 id="the-anb-type">
26792691
The <code>&lt;an+b></code> type</h3>

css-syntax/Overview.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</p>
5959
<h1 class="p-name no-ref" id=title>CSS Syntax Module Level 3</h1>
6060
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
61-
<span class=dt-updated><span class=value-title title=20140221>21 February 2014</span></span></span></h2>
61+
<span class=dt-updated><span class=value-title title=20140301>1 March 2014</span></span></span></h2>
6262
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-syntax-3/>http://www.w3.org/TR/css-syntax-3/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/</a><dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/</a>
6363
<dt>Feedback:</dt>
6464
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-syntax%5D%20feedback">www-style@w3.org</a>
@@ -4118,7 +4118,9 @@ <h2 class="heading settled heading" data-level=6 id=anb><span class=secno>6 </sp
41184118

41194119
<div class=example>
41204120
<p>Example:
4121-
<pre>-n+6 /* represents the first 6 elements of the list */</pre> </div>
4121+
<pre>-1n+6 /* represents the first 6 elements of the list */
4122+
-4n+10 /* represents the 2nd, 6th, and 10th elements of the list */
4123+
</pre> </div>
41224124

41234125
<p> If both <var>A</var> and <var>B</var> are 0,
41244126
the pseudo-class represents no element in the list.
@@ -4174,6 +4176,13 @@ <h3 class="heading settled heading" data-level=6.1 id=anb-syntax><span class=sec
41744176
+ 2n
41754177
+ 2</pre> </div>
41764178

4179+
<p> When B is negative, its minus sign replaces the <span class=css data-link-type=maybe title=+>+</span> sign.
4180+
4181+
<div class=example>
4182+
<p>Valid example:
4183+
<pre>3n-6</pre> <p>Invalid example:
4184+
<pre>3n + -6</pre> </div>
4185+
41774186

41784187
<h3 class="heading settled heading" data-level=6.2 id=the-anb-type><span class=secno>6.2 </span><span class=content>
41794188
The <code>&lt;an+b&gt;</code> type</span><a class=self-link href=#the-anb-type></a></h3>

0 commit comments

Comments
 (0)