Skip to content

Commit 1b93083

Browse files
committed
[css2] Minor fix, added section on default attribute values in DTDs (TO BE COMPLETED)
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401163
1 parent e9c2f96 commit 1b93083

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

css2/selector.src

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
22
<html lang="en">
3-
<!-- $Id: selector.src,v 2.22 1998-03-13 10:45:24 bbos Exp $ -->
3+
<!-- $Id: selector.src,v 2.23 1998-03-14 00:43:19 ijacobs Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Selectors</title>
@@ -37,7 +37,7 @@ selectors</a></TR>
3737
<TR><TD>A &gt; B<TD>Matches any B element that is a child of
3838
an element A.<TD><a href="#child-selectors">Child selectors</a></TR>
3939
<TR><TD>E:link<br>E:visited <TD>Matches element E if E is the source
40-
acnhor of a hyperlink of which the target is not yet visited (:link)
40+
anchor of a hyperlink of which the target is not yet visited (:link)
4141
or already visited (:visited)
4242
<TD><a href="#link-pseudo-classes">The link pseudo-classes</a>
4343
<TR><TD>E:active<br>E:hover<br>E:focus <TD>Matches E during certain
@@ -423,6 +423,37 @@ to be read aloud in different voices for each role:</p>
423423
</pre>
424424
</div>
425425

426+
<H3>Default attribute values in DTDs</H3>
427+
428+
<P>Matching takes place on attribute values in the document tree. For
429+
document languages other than HTML, default attribute values may be
430+
defined in a <span class="index-inst" title="DTD">DTD</span>. Style
431+
sheets should be designed so that they work even if a DTD does not
432+
accompany a document.
433+
434+
<!-- Fix this example from Martin
435+
<P>For an element EXAMPLE with a DTD fragment of
436+
437+
<!ATTLIST ex_attribute ... default-value [Bert, please complete here]
438+
439+
if the style sheet contains a rule
440+
441+
EXAMPLE[ex_attribute=default-value] { ... property settings ... }
442+
EXAMPLE[ex_attribute=other-value] { .......}
443+
444+
then to catch the cases where this attribute is set by default,
445+
and not explicitly, the following rule might be added:
446+
447+
EXAMPLE { ... the same property settings ... }
448+
449+
Because this selector is less specific that a selector with
450+
another specific attribute value, it will only be used for
451+
the default case. Care has to be taken that all other attribute
452+
values that don't get the same style as the default value are
453+
explicitly covered.
454+
455+
-IJ -->
456+
426457

427458
<h3><a name="class-html">The "class" attribute in HTML</a></h3>
428459

@@ -735,7 +766,6 @@ declarations are equivalent:</p>
735766
A:link { color: red }
736767
:link { color: red }
737768
</pre>
738-
</div>
739769

740770
<!-- What about LINK? Why only A elements (WG still out on
741771
this)? What about XML? -IJ -->

0 commit comments

Comments
 (0)