Skip to content

Commit fe00b7d

Browse files
committed
[css2] Rewrote example with default attribute to use fantasai's text.
Rewrote sentence about position of fictional tag. --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402242
1 parent 43bb516 commit fe00b7d

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

css2/selector.src

Lines changed: 20 additions & 15 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.88 2004-02-09 21:47:46 bbos Exp $ -->
3+
<!-- $Id: selector.src,v 2.89 2004-03-08 18:39:12 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Selectors</title>
@@ -454,6 +454,7 @@ DTD.)
454454
external subsets.
455455

456456
<div class="example">
457+
<P style="display:none">Example:</P>
457458
<P>For example, consider an element EXAMPLE with an attribute "notation"
458459
that has a default value of "decimal". The DTD fragment might be
459460

@@ -465,21 +466,25 @@ that has a default value of "decimal". The DTD fragment might be
465466

466467
<pre class="example">
467468
EXAMPLE[notation=decimal] { /*... default property settings ...*/ }
468-
EXAMPLE[notation=octal] { /*... other settings...*/ }
469+
EXAMPLE[notation=octal] { /*... other settings...*/ }
469470
</pre>
470471

471-
<p>then to catch the cases where this attribute is set by default,
472-
and not explicitly, the following rule might be added:
472+
<p>the first rule will not match elements whose "notation" attribute
473+
is set by default, i.e. not set explicitly. To catch all cases, the
474+
attribute selector for the default value must be dropped:</p>
473475

474476
<pre class="example">
475-
EXAMPLE { /*... default property settings ...*/ }
477+
EXAMPLE { /*... default property settings ...*/ }
478+
EXAMPLE[notation=octal] { /*... other settings...*/ }
476479
</pre>
477480

478-
<p>Because this selector is less
479-
<a href="cascade.html#specificity">
480-
specific</a> than an attribute selector, it will only be used for the
481-
default case. Care has to be taken that all other attribute values
482-
that don't get the same style as the default are explicitly covered.
481+
<p>Here, because the selector <code>EXAMPLE[notation=octal]</code> is
482+
more <a href="cascade.html#specificity">specific</a> than the tag
483+
selector alone, the style declarations in the second rule will override
484+
those in the first for elements that have a "notation" attribute value
485+
of "octal". Care has to be taken that all property declarations that
486+
are to apply only to the default case are overridden in the non-default
487+
cases' style rules.
483488
</div>
484489

485490

@@ -1095,11 +1100,11 @@ the line "Hello".
10951100
(assuming the default style for BR in HTML 4.0). The word "First" is
10961101
not on the first formatted line.
10971102

1098-
<p>A UA should act as if the fictional start tag of the first-line
1099-
pseudo-element is just inside the innermost enclosing block-level
1100-
element. (Since CSS1 and CSS2 were silent on this case, authors
1101-
should not rely on this behavior.) Here is an example. The fictional
1102-
tag sequence for
1103+
<p>A UA should act as if the fictional start tags of the first-line
1104+
pseudo-elements were nested just inside the innermost enclosing
1105+
block-level element. (Since CSS1 and CSS2 were silent on this case,
1106+
authors should not rely on this behavior.) Here is an example. The
1107+
fictional tag sequence for
11031108

11041109
<pre>
11051110
&lt;DIV>

0 commit comments

Comments
 (0)