Skip to content

Commit 264ac8e

Browse files
committed
Review
1 parent 327b2ae commit 264ac8e

File tree

1 file changed

+26
-31
lines changed

1 file changed

+26
-31
lines changed

source

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6803,21 +6803,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
68036803

68046804
<!--en-GB--><h4 id="colours">Legacy colors</h4>
68056805

6806-
<p>Some obsolete legacy attributes parse colors in a more complicated manner, using the
6806+
<p>Some obsolete legacy attributes parse colors using the
68076807
<!--en-GB--><dfn id="rules-for-parsing-a-legacy-colour-value">rules for parsing a legacy color
6808-
value</dfn>, which are given in the following algorithm. When invoked, the steps must be followed
6809-
in the order given, aborting at the first step that returns a value. This algorithm will return
6810-
either a CSS color or an error.</p>
6808+
value</dfn>, given a string <var>input</var>. They will return either a CSS color or failure.</p>
68116809

68126810
<ol>
6813-
<li><p>Let <var>input</var> be the string being parsed.</p></li>
6814-
6815-
<li><p>If <var>input</var> is the empty string, then return an error.</p></li>
6811+
<li><p>If <var>input</var> is the empty string, then return failure.</p></li>
68166812

68176813
<li><p><span>Strip leading and trailing ASCII whitespace</span> from <var>input</var>.</p></li>
68186814

6819-
<li><p>If <var>input</var> is an <span>ASCII case-insensitive</span> match for the
6820-
string "<code data-x="">transparent</code>", then return an error.</p></li>
6815+
<li><p>If <var>input</var> is an <span>ASCII case-insensitive</span> match for "<code
6816+
data-x="">transparent</code>", then return failure.</p></li>
68216817

68226818
<li>
68236819
<p>If <var>input</var> is an <span>ASCII case-insensitive</span> match for one of the <span
@@ -6851,20 +6847,19 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
68516847
</li>
68526848

68536849
<li><p>Replace any <span data-x="code point">code points</span> greater than U+FFFF in
6854-
<var>input</var> (i.e., any characters that are not in the basic multilingual plane) with the
6855-
two-character string "<code data-x="">00</code>".</p></li>
6850+
<var>input</var> (i.e., any characters that are not in the basic multilingual plane) with "<code
6851+
data-x="">00</code>".</p></li>
68566852

68576853
<li><p>If <var>input</var>'s <span>code point length</span> is greater than 128, truncate
68586854
<var>input</var>, leaving only the first 128 characters.</p></li>
68596855

6860-
<li><p>If the first character in <var>input</var> is a U+0023 NUMBER SIGN character (#),
6861-
remove it.</p></li>
6856+
<li><p>If the first character in <var>input</var> is U+0023 (#), then remove it.</p></li>
68626857

68636858
<li><p>Replace any character in <var>input</var> that is not an <span data-x="ASCII hex
6864-
digits">ASCII hex digit</span> with the character U+0030 DIGIT ZERO (0).</p></li>
6859+
digits">ASCII hex digit</span> with U+0030 (0).</p></li>
68656860

68666861
<li><p>While <var>input</var>'s <span>code point length</span> is zero or not a multiple of
6867-
three, append a U+0030 DIGIT ZERO (0) character to <var>input</var>.</p></li>
6862+
three, append U+0030 (0) to <var>input</var>.</p></li>
68686863

68696864
<li><p>Split <var>input</var> into three strings of equal <span>code point length</span>, to
68706865
obtain three components. Let <var>length</var> be the <span>code point length</span> that all of
@@ -6874,7 +6869,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
68746869
data-x=""><var>length</var>-8</span> characters in each component, and let <var>length</var> be 8.</p></li>
68756870

68766871
<li><p>While <var>length</var> is greater than two and the first character in each
6877-
component is a U+0030 DIGIT ZERO (0) character, remove that character and reduce <var>length</var> by one.</p></li>
6872+
component is U+0030 (0), remove that character and reduce <var>length</var> by one.</p></li>
68786873

68796874
<li><p>If <var>length</var> is <em>still</em> greater than two, truncate each component,
68806875
leaving only the first two characters in each.</p></li>
@@ -50287,8 +50282,8 @@ ldh-str = &lt; as defined in <a href="https://www.rfc-editor.org/rfc/rfc10
5028750282
element's <span data-x="concept-fe-value">value</span> to a string representing the serialization
5028850283
of a CSS color.</p>
5028950284

50290-
<p class="note">In this state, there is always a CSS color picked, and there is no way to set the
50291-
value to the empty string.</p>
50285+
<p class="note">In this state, there is always a CSS color picked, and there is no way for the end
50286+
user to set the value to the empty string.</p>
5029250287

5029350288
<p>The <dfn element-attr for="input"><code data-x="attr-input-alpha">alpha</code></dfn> attribute
5029450289
is a <span>boolean attribute</span>. If present, it indicates the CSS color's alpha component can
@@ -50318,7 +50313,7 @@ ldh-str = &lt; as defined in <a href="https://www.rfc-editor.org/rfc/rfc10
5031850313
data-x="attr-input-colorspace-display-p3">display-p3</code></dfn>
5031950314
<td><dfn data-x="attr-input-colorspace-display-p3-state">Display P3</dfn>
5032050315
<td>The CSS color is converted to the <span>'display-p3'</span> color space, e.g., "<code
50321-
data-x="">color(display-p3 0.84 0.19 0.72 / 0.6)</code>".
50316+
data-x="">color(display-p3 1.84 -0.19 0.72 / 0.6)</code>".
5032250317
</table>
5032350318

5032450319
<p>The attribute's <i data-x="missing value default">missing value default</i> and <i
@@ -133733,33 +133728,33 @@ html, body { display: block; }</code></pre>
133733133728

133734133729
<p>When a <code>body</code> element has a <code data-x="attr-body-bgcolor">bgcolor</code>
133735133730
attribute set, the new value is expected to be parsed using the <span>rules for parsing a legacy
133736-
color value</span>, and if that does not return an error, the user agent is expected to treat the
133731+
color value</span>, and if that does not return failure, the user agent is expected to treat the
133737133732
attribute as a <span data-x="presentational hints">presentational hint</span> setting the
133738133733
element's <span>'background-color'</span> property to the resulting color.</p>
133739133734

133740133735
<p>When a <code>body</code> element has a <code data-x="attr-body-text">text</code> attribute, its
133741133736
value is expected to be parsed using the <span>rules for parsing a legacy color value</span>, and
133742-
if that does not return an error, the user agent is expected to treat the attribute as a <span
133737+
if that does not return failure, the user agent is expected to treat the attribute as a <span
133743133738
data-x="presentational hints">presentational hint</span> setting the element's
133744133739
<span>'color'</span> property to the resulting color.</p>
133745133740

133746133741
<p>When a <code>body</code> element has a <code data-x="attr-body-link">link</code> attribute, its
133747133742
value is expected to be parsed using the <span>rules for parsing a legacy color value</span>, and
133748-
if that does not return an error, the user agent is expected to treat the attribute as a <span
133743+
if that does not return failure, the user agent is expected to treat the attribute as a <span
133749133744
data-x="presentational hints">presentational hint</span> setting the <span>'color'</span> property
133750133745
of any element in the <code>Document</code> matching the <code data-x="selector-link">:link</code>
133751133746
<span>pseudo-class</span> to the resulting color.</p>
133752133747

133753133748
<p>When a <code>body</code> element has a <code data-x="attr-body-vlink">vlink</code> attribute,
133754133749
its value is expected to be parsed using the <span>rules for parsing a legacy color value</span>,
133755-
and if that does not return an error, the user agent is expected to treat the attribute as a <span
133750+
and if that does not return failure, the user agent is expected to treat the attribute as a <span
133756133751
data-x="presentational hints">presentational hint</span> setting the <span>'color'</span> property
133757133752
of any element in the <code>Document</code> matching the <code
133758133753
data-x="selector-visited">:visited</code> <span>pseudo-class</span> to the resulting color.</p>
133759133754

133760133755
<p>When a <code>body</code> element has an <code data-x="attr-body-alink">alink</code> attribute,
133761133756
its value is expected to be parsed using the <span>rules for parsing a legacy color value</span>,
133762-
and if that does not return an error, the user agent is expected to treat the attribute as a <span
133757+
and if that does not return failure, the user agent is expected to treat the attribute as a <span
133763133758
data-x="presentational hints">presentational hint</span> setting the <span>'color'</span> property
133764133759
of any element in the <code>Document</code> matching the
133765133760
<code data-x="selector-active">:active</code> <span>pseudo-class</span> and either the <code
@@ -133962,7 +133957,7 @@ br[clear=all i], br[clear=both i] { clear: both; }</code></pre>
133962133957

133963133958
<p>When a <code>font</code> element has a <code data-x="attr-font-color" undefined>color</code>
133964133959
attribute, its value is expected to be parsed using the <span>rules for parsing a legacy color
133965-
value</span>, and if that does not return an error, the user agent is expected to treat the
133960+
value</span>, and if that does not return failure, the user agent is expected to treat the
133966133961
attribute as a <span data-x="presentational hints">presentational hint</span> setting the
133967133962
element's <span>'color'</span> property to the resulting color.</p>
133968133963

@@ -134572,13 +134567,13 @@ table {
134572134567
<p>When a <code>table</code>, <code>thead</code>, <code>tbody</code>, <code>tfoot</code>,
134573134568
<code>tr</code>, <code>td</code>, or <code>th</code> element has a <code data-x="">bgcolor</code>
134574134569
attribute set, the new value is expected to be parsed using the <span>rules for parsing a legacy
134575-
color value</span>, and if that does not return an error, the user agent is expected to treat the
134570+
color value</span>, and if that does not return failure, the user agent is expected to treat the
134576134571
attribute as a <span data-x="presentational hints">presentational hint</span> setting the element's
134577134572
<span>'background-color'</span> property to the resulting color.</p>
134578134573

134579134574
<p>When a <code>table</code> element has a <code data-x="attr-table-bordercolor">bordercolor</code>
134580134575
attribute, its value is expected to be parsed using the <span>rules for parsing a legacy color
134581-
value</span>, and if that does not return an error, the user agent is expected to treat the
134576+
value</span>, and if that does not return failure, the user agent is expected to treat the
134582134577
attribute as a <span data-x="presentational hints">presentational hint</span> setting the
134583134578
element's <span>'border-top-color'</span>, <span>'border-right-color'</span>,
134584134579
<span>'border-bottom-color'</span>, and <span>'border-left-color'</span> properties to the
@@ -134766,7 +134761,7 @@ hr[color], hr[noshade] { border-style: solid; }</code></pre>
134766134761

134767134762
<p>When an <code>hr</code> element has a <code data-x="attr-hr-color">color</code> attribute, its
134768134763
value is expected to be parsed using the <span>rules for parsing a legacy color value</span>, and
134769-
if that does not return an error, the user agent is expected to treat the attribute as a <span
134764+
if that does not return failure, the user agent is expected to treat the attribute as a <span
134770134765
data-x="presentational hints">presentational hint</span> setting the element's
134771134766
<span>'color'</span> property to the resulting color.</p>
134772134767

@@ -135958,7 +135953,7 @@ marquee {
135958135953

135959135954
<p>When a <code>marquee</code> element has a <code undefined data-x="attr-marquee-bgcolor">bgcolor</code>
135960135955
attribute set, the value is expected to be parsed using the <span>rules for parsing a legacy color
135961-
value</span>, and if that does not return an error, the user agent is expected to treat the
135956+
value</span>, and if that does not return failure, the user agent is expected to treat the
135962135957
attribute as a <span data-x="presentational hints">presentational hint</span> setting the element's
135963135958
<span>'background-color'</span> property to the resulting color.</p>
135964135959

@@ -136341,8 +136336,8 @@ progress { appearance: auto; }</code></pre>
136341136336

136342136337
<ol>
136343136338
<li><p>If the element has a <code data-x="">bordercolor</code> attribute, and applying the
136344-
<span>rules for parsing a legacy color value</span> to that attribute's value does not result
136345-
in an error, then return the color so obtained.</p></li>
136339+
<span>rules for parsing a legacy color value</span> to that attribute's value does not return
136340+
failure, then return the color so obtained.</p></li>
136346136341

136347136342
<li><p>Otherwise, if the element has a parent element that is a <code>frameset</code> element,
136348136343
then return the <span>frame border color</span> of that element.</p>

0 commit comments

Comments
 (0)