Skip to content

Commit f691080

Browse files
committed
Fix incorrect CSS in text-decoration example
The paragraph preceding the example for the text-decoration property in both CSS Text Decoration Module Level 3 and Level 4 says: > The following example underlines unvisited links with a solid blue underline in CSS1 and CSS2 UAs and a navy dotted underline in CSS3 UAs. However, the example uses a type selector of `link`. The `link` element is not used for hyperlinks, but instead to link their document to other resources, more typically used in the `<head>` of the document. The `a` element is used for hyperlinks. As a result, the example CSS does not do what is described. Looking at the history, it looks like the selector was originally `:link` but the colon was mistakenly removed in b32b070, a commit which was intended to only change whitespace. The incorrect example was then copied into the Level 4 spec. Restore the original `:link` selector, which would correctly targets unvisited links.
1 parent d1828fe commit f691080

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

css-text-decor-3/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ Text Decoration Shorthand: the 'text-decoration' property</h3>
328328
underline in CSS1 and CSS2 UAs and a navy dotted underline in CSS3 UAs.
329329

330330
<pre>
331-
link {
331+
:link {
332332
color: blue;
333333
text-decoration: underline;
334334
text-decoration: navy dotted underline; /* <a href="https://www.w3.org/TR/CSS21/syndata.html#ignore">Ignored</a> in CSS1/CSS2 UAs */

css-text-decor-4/Overview.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ Text Decoration Shorthand: the 'text-decoration' property</h3>
483483
underline in CSS1 and CSS2 UAs and a navy dotted underline in CSS3 UAs.
484484

485485
<pre>
486-
link {
486+
:link {
487487
color: blue;
488488
text-decoration: underline;
489489
text-decoration: navy dotted underline; /* <a href="https://www.w3.org/TR/CSS21/syndata.html#ignore">Ignored</a> in CSS1/CSS2 UAs */

0 commit comments

Comments
 (0)