Skip to content

Commit 0975267

Browse files
committed
[css-syntax] Dont' do <urange> fixup, instead just make it invalid.
1 parent 6c71d40 commit 0975267

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

css-syntax/Overview.bs

+4-7
Original file line numberDiff line numberDiff line change
@@ -2908,15 +2908,15 @@ The <<urange>> type</h3>
29082908
In this production,
29092909
no whitespace can occur between any of the tokens.
29102910

2911-
The <<urange>> production represents a range of one or more contiguous unicode code points,
2911+
The <<urange>> production represents a range of one or more contiguous unicode code points
2912+
as a <var>start value</var> and an <var>end value</var>,
29122913
which are non-negative integers.
29132914
Each clause of the above grammar is interpreted as follows:
29142915

29152916
: <code>u '+' <<urange-codepoint>></code>
29162917
::
29172918
<a title="interpret a token as a hex integer">Interpret the &lt;urange-codepoint> as a hex integer</a>.
29182919
Let <var>start value</var> and <var>end value</var> both be the returned value.
2919-
29202920
: <code>u '+' <<urange-codepoint>>? '?'+</code>
29212921
::
29222922
If the <<urange-codepoint>> is specified,
@@ -2926,13 +2926,10 @@ The <<urange>> type</h3>
29262926

29272927
Let <var>start value</var> be <code style="white-space: nowrap">B✕(16<sup>S</sup>)</code>.
29282928
Let <var>end value</var> be <code style="white-space: nowrap">B✕(16<sup>S</sup>) + 16<sup>S+1</sup> − 1</code>.
2929-
29302929
: <code>u '+' <<urange-codepoint>> <<negative-urange-codepoint>></code>
29312930
::
29322931
Let <var>start value</var> be the result of <a title="interpret a token as a hex integer">interpreting the &lt;urange-codepoint> as a hex integer</a>.
29332932
Let <var>end value</var> be the negation of the result of <a title="interpret a token as a hex integer">interpreting the &lt;negative-urange-codepoint> as a hex integer</a>.
2934-
2935-
29362933
: <code>u '+' <<urange-range>></code>
29372934
::
29382935
Split the <<urange-range>>’s representation (or representation + unit)
@@ -2945,10 +2942,10 @@ The <<urange>> type</h3>
29452942
To determine what codepoints the <<urange>> represents:
29462943

29472944
1. If <var>end value</var> is greater than the <a>maximum allowed code point</a>,
2948-
set it to the <a>maximum allowed code point</a>.
2945+
the <<urange>> is invalid and a syntax error.
29492946

29502947
2. If <var>start value</var> is greater than <var>end value</var>,
2951-
the <<urange>> represents an empty range of codepoints.
2948+
the <<urange>> is invalid and a syntax error.
29522949

29532950
3. Otherwise, the <<urange>> represents a contiguous range of codepoints from <var>start value</var> to <var>end value</var>, inclusive.
29542951

css-syntax/Overview.html

+4-7
Original file line numberDiff line numberDiff line change
@@ -4241,15 +4241,15 @@ <h3 class="heading settled" data-level=7.1 id=urange-syntax><span class=secno>7.
42414241
<p>In this production,
42424242
no whitespace can occur between any of the tokens.</p>
42434243

4244-
<p>The <a class="production css" data-link-type=type href=#typedef-urange title="<urange>">&lt;urange&gt;</a> production represents a range of one or more contiguous unicode code points,
4244+
<p>The <a class="production css" data-link-type=type href=#typedef-urange title="<urange>">&lt;urange&gt;</a> production represents a range of one or more contiguous unicode code points
4245+
as a <var>start value</var> and an <var>end value</var>,
42454246
which are non-negative integers.
42464247
Each clause of the above grammar is interpreted as follows:</p>
42474248

42484249
<dl><dt data-md=""><p><code>u '+' <a class="production css" data-link-type=type href=#typedef-urange-codepoint title="<urange-codepoint>">&lt;urange-codepoint&gt;</a></code></p>
42494250
<dd data-md="">
42504251
<p><a data-link-type=dfn href=#interpret-a-token-as-a-hex-integer title="interpret a token as a hex integer">Interpret the &lt;urange-codepoint&gt; as a hex integer</a>.
42514252
Let <var>start value</var> and <var>end value</var> both be the returned value.</p>
4252-
42534253
<dt data-md=""><p><code>u '+' <a class="production css" data-link-type=type href=#typedef-urange-codepoint title="<urange-codepoint>">&lt;urange-codepoint&gt;</a>? '?'+</code></p>
42544254
<dd data-md="">
42554255
<p>If the <a class="production css" data-link-type=type href=#typedef-urange-codepoint title="<urange-codepoint>">&lt;urange-codepoint&gt;</a> is specified,
@@ -4259,13 +4259,10 @@ <h3 class="heading settled" data-level=7.1 id=urange-syntax><span class=secno>7.
42594259

42604260
<p>Let <var>start value</var> be <code style="white-space: nowrap">B✕(16<sup>S</sup>)</code>.
42614261
Let <var>end value</var> be <code style="white-space: nowrap">B✕(16<sup>S</sup>) + 16<sup>S+1</sup> − 1</code>.</p>
4262-
42634262
<dt data-md=""><p><code>u '+' <a class="production css" data-link-type=type href=#typedef-urange-codepoint title="<urange-codepoint>">&lt;urange-codepoint&gt;</a> <a class="production css" data-link-type=type href=#typedef-negative-urange-codepoint title="<negative-urange-codepoint>">&lt;negative-urange-codepoint&gt;</a></code></p>
42644263
<dd data-md="">
42654264
<p>Let <var>start value</var> be the result of <a data-link-type=dfn href=#interpret-a-token-as-a-hex-integer title="interpret a token as a hex integer">interpreting the &lt;urange-codepoint&gt; as a hex integer</a>.
42664265
Let <var>end value</var> be the negation of the result of <a data-link-type=dfn href=#interpret-a-token-as-a-hex-integer title="interpret a token as a hex integer">interpreting the &lt;negative-urange-codepoint&gt; as a hex integer</a>.</p>
4267-
4268-
42694266
<dt data-md=""><p><code>u '+' <a class="production css" data-link-type=type href=#typedef-urange-range title="<urange-range>">&lt;urange-range&gt;</a></code></p>
42704267
<dd data-md="">
42714268
<p>Split the <a class="production css" data-link-type=type href=#typedef-urange-range title="<urange-range>">&lt;urange-range&gt;</a>’s representation (or representation + unit)
@@ -4278,10 +4275,10 @@ <h3 class="heading settled" data-level=7.1 id=urange-syntax><span class=secno>7.
42784275
<p>To determine what codepoints the <a class="production css" data-link-type=type href=#typedef-urange title="<urange>">&lt;urange&gt;</a> represents:</p>
42794276

42804277
<ol><li data-md=""><p>If <var>end value</var> is greater than the <a data-link-type=dfn href=#maximum-allowed-code-point title="maximum allowed code point">maximum allowed code point</a>,
4281-
set it to the <a data-link-type=dfn href=#maximum-allowed-code-point title="maximum allowed code point">maximum allowed code point</a>.</p>
4278+
the <a class="production css" data-link-type=type href=#typedef-urange title="<urange>">&lt;urange&gt;</a> is invalid and a syntax error.</p>
42824279

42834280
<li data-md=""><p>If <var>start value</var> is greater than <var>end value</var>,
4284-
the <a class="production css" data-link-type=type href=#typedef-urange title="<urange>">&lt;urange&gt;</a> represents an empty range of codepoints.</p>
4281+
the <a class="production css" data-link-type=type href=#typedef-urange title="<urange>">&lt;urange&gt;</a> is invalid and a syntax error.</p>
42854282

42864283
<li data-md=""><p>Otherwise, the <a class="production css" data-link-type=type href=#typedef-urange title="<urange>">&lt;urange&gt;</a> represents a contiguous range of codepoints from <var>start value</var> to <var>end value</var>, inclusive.</p>
42874284
</ol>

0 commit comments

Comments
 (0)