Skip to content

Commit f7ccfef

Browse files
committed
[css2] New phrasing of cascading order.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401532
1 parent 6314e9a commit f7ccfef

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

css2/cascade.src

Lines changed: 12 additions & 8 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: cascade.src,v 2.24 1998-04-23 23:10:53 ijacobs Exp $ -->
3+
<!-- $Id: cascade.src,v 2.25 1998-04-26 23:04:14 bbos 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>
@@ -280,44 +280,48 @@ the same precedence rules apply.
280280

281281
<H3><a name="cascading-order">Cascading order</a></H3>
282282

283+
<!-- Removed concept of "algorithm" [12/4/1998,BB] -->
283284
<P>To find the value for an element/property combination, user agents
284-
must apply the following algorithm:</p>
285+
must apply the following sorting order:</p>
285286

286287
<OL>
287288
<LI>
288289
Find all declarations that apply to the element and property in
289290
question, for the target <a href="media.html">media type</a>.
290291
Declarations apply if the associated selector <A
291-
HREF="selector.html">matches</A> the element in question. If no
292-
declarations apply, terminate the algorithm.
292+
HREF="selector.html">matches</A> the element in question. <!-- If no
293+
declarations apply, terminate the algorithm. -->
293294

294295
<LI>
295-
Sort the declarations by weight and origin: For normal
296+
The primary sort of the declarations is by weight and origin: for normal
296297
declarations, author style sheets override
297298
user style sheets which override the default style sheet. For
298299
<span class="index-def" title="important">"!important"</span>
299300
declarations, user style sheets override author style sheets
300301
which override the default style sheet.
302+
"!important" declaration override normal declarations.
301303
An imported style sheet has the same
302304
origin as the style sheet that imported it.
303305

304306
<LI>
305-
Sort by specificity of selector: more specific selectors will
307+
The secondary sort is by specificity of selector: more specific selectors will
306308
override more general ones. <!-- The definition and calculation
307309
of specificity depends on the document language (see below). [I
308310
don't think so. BB]-->
309311
Pseudo-elements and pseudo-classes are counted as normal
310312
elements and classes, respectively.
311313

312-
<LI> Sort by order specified: if two rules have the same weight,
314+
<LI> Finally, sort by order specified: if two rules have the same
315+
weight, origin and specificity,
313316
the latter specified wins. Rules in imported style sheets are
314317
considered to be before any rules in the style sheet itself.
315318
</OL>
316319

320+
<!--
317321
<P>The search for the property value must be terminated when any of
318322
the above steps yields a rule that has a higher weight than the other
319323
rules that apply to the same element/property combination.
320-
324+
-->
321325
<!--
322326
<P>Note that "!important" may occur in author's and UA's style sheets,
323327
but only has an effect in the user's style sheets.

0 commit comments

Comments
 (0)