@@ -6803,21 +6803,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
6803
6803
6804
6804
<!--en-GB--><h4 id="colours">Legacy colors</h4>
6805
6805
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
6807
6807
<!--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>
6811
6809
6812
6810
<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>
6816
6812
6817
6813
<li><p><span>Strip leading and trailing ASCII whitespace</span> from <var>input</var>.</p></li>
6818
6814
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>
6821
6817
6822
6818
<li>
6823
6819
<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
6851
6847
</li>
6852
6848
6853
6849
<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>
6856
6852
6857
6853
<li><p>If <var>input</var>'s <span>code point length</span> is greater than 128, truncate
6858
6854
<var>input</var>, leaving only the first 128 characters.</p></li>
6859
6855
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>
6862
6857
6863
6858
<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>
6865
6860
6866
6861
<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>
6868
6863
6869
6864
<li><p>Split <var>input</var> into three strings of equal <span>code point length</span>, to
6870
6865
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
6874
6869
data-x=""><var>length</var>-8</span> characters in each component, and let <var>length</var> be 8.</p></li>
6875
6870
6876
6871
<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>
6878
6873
6879
6874
<li><p>If <var>length</var> is <em>still</em> greater than two, truncate each component,
6880
6875
leaving only the first two characters in each.</p></li>
@@ -50287,8 +50282,8 @@ ldh-str = < as defined in <a href="https://www.rfc-editor.org/rfc/rfc10
50287
50282
element's <span data-x="concept-fe-value">value</span> to a string representing the serialization
50288
50283
of a CSS color.</p>
50289
50284
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>
50292
50287
50293
50288
<p>The <dfn element-attr for="input"><code data-x="attr-input-alpha">alpha</code></dfn> attribute
50294
50289
is a <span>boolean attribute</span>. If present, it indicates the CSS color's alpha component can
@@ -50318,7 +50313,7 @@ ldh-str = < as defined in <a href="https://www.rfc-editor.org/rfc/rfc10
50318
50313
data-x="attr-input-colorspace-display-p3">display-p3</code></dfn>
50319
50314
<td><dfn data-x="attr-input-colorspace-display-p3-state">Display P3</dfn>
50320
50315
<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>".
50322
50317
</table>
50323
50318
50324
50319
<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>
133733
133728
133734
133729
<p>When a <code>body</code> element has a <code data-x="attr-body-bgcolor">bgcolor</code>
133735
133730
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
133737
133732
attribute as a <span data-x="presentational hints">presentational hint</span> setting the
133738
133733
element's <span>'background-color'</span> property to the resulting color.</p>
133739
133734
133740
133735
<p>When a <code>body</code> element has a <code data-x="attr-body-text">text</code> attribute, its
133741
133736
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
133743
133738
data-x="presentational hints">presentational hint</span> setting the element's
133744
133739
<span>'color'</span> property to the resulting color.</p>
133745
133740
133746
133741
<p>When a <code>body</code> element has a <code data-x="attr-body-link">link</code> attribute, its
133747
133742
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
133749
133744
data-x="presentational hints">presentational hint</span> setting the <span>'color'</span> property
133750
133745
of any element in the <code>Document</code> matching the <code data-x="selector-link">:link</code>
133751
133746
<span>pseudo-class</span> to the resulting color.</p>
133752
133747
133753
133748
<p>When a <code>body</code> element has a <code data-x="attr-body-vlink">vlink</code> attribute,
133754
133749
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
133756
133751
data-x="presentational hints">presentational hint</span> setting the <span>'color'</span> property
133757
133752
of any element in the <code>Document</code> matching the <code
133758
133753
data-x="selector-visited">:visited</code> <span>pseudo-class</span> to the resulting color.</p>
133759
133754
133760
133755
<p>When a <code>body</code> element has an <code data-x="attr-body-alink">alink</code> attribute,
133761
133756
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
133763
133758
data-x="presentational hints">presentational hint</span> setting the <span>'color'</span> property
133764
133759
of any element in the <code>Document</code> matching the
133765
133760
<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>
133962
133957
133963
133958
<p>When a <code>font</code> element has a <code data-x="attr-font-color" undefined>color</code>
133964
133959
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
133966
133961
attribute as a <span data-x="presentational hints">presentational hint</span> setting the
133967
133962
element's <span>'color'</span> property to the resulting color.</p>
133968
133963
@@ -134572,13 +134567,13 @@ table {
134572
134567
<p>When a <code>table</code>, <code>thead</code>, <code>tbody</code>, <code>tfoot</code>,
134573
134568
<code>tr</code>, <code>td</code>, or <code>th</code> element has a <code data-x="">bgcolor</code>
134574
134569
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
134576
134571
attribute as a <span data-x="presentational hints">presentational hint</span> setting the element's
134577
134572
<span>'background-color'</span> property to the resulting color.</p>
134578
134573
134579
134574
<p>When a <code>table</code> element has a <code data-x="attr-table-bordercolor">bordercolor</code>
134580
134575
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
134582
134577
attribute as a <span data-x="presentational hints">presentational hint</span> setting the
134583
134578
element's <span>'border-top-color'</span>, <span>'border-right-color'</span>,
134584
134579
<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>
134766
134761
134767
134762
<p>When an <code>hr</code> element has a <code data-x="attr-hr-color">color</code> attribute, its
134768
134763
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
134770
134765
data-x="presentational hints">presentational hint</span> setting the element's
134771
134766
<span>'color'</span> property to the resulting color.</p>
134772
134767
@@ -135958,7 +135953,7 @@ marquee {
135958
135953
135959
135954
<p>When a <code>marquee</code> element has a <code undefined data-x="attr-marquee-bgcolor">bgcolor</code>
135960
135955
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
135962
135957
attribute as a <span data-x="presentational hints">presentational hint</span> setting the element's
135963
135958
<span>'background-color'</span> property to the resulting color.</p>
135964
135959
@@ -136341,8 +136336,8 @@ progress { appearance: auto; }</code></pre>
136341
136336
136342
136337
<ol>
136343
136338
<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>
136346
136341
136347
136342
<li><p>Otherwise, if the element has a parent element that is a <code>frameset</code> element,
136348
136343
then return the <span>frame border color</span> of that element.</p>
0 commit comments