11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22<html lang="en">
3- <!-- $Id: cascade.src,v 2.25 1998-04-26 23:04:14 bbos Exp $ -->
3+ <!-- $Id: cascade.src,v 2.26 1998-04-28 22:26:16 ijacobs Exp $ -->
44<HEAD>
55<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66<TITLE>Assigning property values, Cascading, and Inheritance</TITLE>
@@ -29,8 +29,7 @@ on the following mechanisms (in order of precedence):</p>
2929
3030<ol>
3131<li>If the <a href="#cascade">cascade</a> results in a value,
32- use it. <!-- If the value is 'inherit', use the value of the parent
33- element. -->
32+ use it.
3433
3534<li>Otherwise, if the property is <a
3635href="#inheritance">inherited</a>, use the value of the parent
@@ -280,7 +279,6 @@ the same precedence rules apply.
280279
281280<H3><a name="cascading-order">Cascading order</a></H3>
282281
283- <!-- Removed concept of "algorithm" [12/4/1998,BB] -->
284282<P>To find the value for an element/property combination, user agents
285283must apply the following sorting order:</p>
286284
@@ -289,8 +287,7 @@ must apply the following sorting order:</p>
289287 Find all declarations that apply to the element and property in
290288 question, for the target <a href="media.html">media type</a>.
291289 Declarations apply if the associated selector <A
292- HREF="selector.html">matches</A> the element in question. <!-- If no
293- declarations apply, terminate the algorithm. -->
290+ HREF="selector.html">matches</A> the element in question.
294291
295292 <LI>
296293 The primary sort of the declarations is by weight and origin: for normal
@@ -304,33 +301,21 @@ must apply the following sorting order:</p>
304301 origin as the style sheet that imported it.
305302
306303 <LI>
307- The secondary sort is by specificity of selector: more specific selectors will
308- override more general ones. <!-- The definition and calculation
309- of specificity depends on the document language (see below). [I
310- don't think so. BB]-->
311- Pseudo-elements and pseudo-classes are counted as normal
312- elements and classes, respectively.
304+ The secondary sort is by <a href="#specificity">specificity</a>
305+ of selector: more specific
306+ selectors will override more general ones. Pseudo-elements and
307+ pseudo-classes are counted as normal elements and classes,
308+ respectively.
313309
314310 <LI> Finally, sort by order specified: if two rules have the same
315311 weight, origin and specificity,
316312 the latter specified wins. Rules in imported style sheets are
317313 considered to be before any rules in the style sheet itself.
318314</OL>
319315
320- <!--
321- <P>The search for the property value must be terminated when any of
322- the above steps yields a rule that has a higher weight than the other
323- rules that apply to the same element/property combination.
324- -->
325- <!--
326- <P>Note that "!important" may occur in author's and UA's style sheets,
327- but only has an effect in the user's style sheets.
328- [nope, Chris Wilson wanted it to count, HWL]
329- -->
330-
331316<P> Apart from the "!important" setting on individual declarations,
332317this strategy gives author's style sheets higher weight than those of
333- the reader. It is therefore important that the user agent gives the
318+ the reader. It is therefore important that the user agent give the
334319user the ability to turn off the influence of a certain style sheet,
335320e.g., through a pull-down menu.
336321
0 commit comments