11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22<html lang="en">
3- <!-- $Id: cascade.src,v 2.15 1998-03-16 15:07 :55 howcome Exp $ -->
3+ <!-- $Id: cascade.src,v 2.16 1998-03-17 00:37 :55 howcome 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>
@@ -220,11 +220,35 @@ value</h3>
220220<P>Each property may also have a specified value of 'inherit', which
221221means that, for a given element, the property takes the same <a
222222href="#actual-value">actual value</a> as the property for the
223- element's parent.
223+ element's parent. The inherited value, which is normally only used as
224+ a fallback value, can be strengthend by setting 'inherit' explicitly.
224225
225- <!-- Add an example here. Check out:
226+ <div class="example"><P>In the example below, the <span
227+ class="propinst-color">'color'</span> and <span
228+ class="propinst-background">'background'</span> properties are set on
229+ the BODY element. On all other elements, the 'color' value will be
230+ inherited and the background will be transparent. If these rules are
231+ part of the user's style sheet, black text on a white background will
232+ be enforced throughout the document.
233+
234+ <PRE>
235+ BODY {
236+ color: black !important;
237+ background: white !important;
238+ }
239+
240+ * {
241+ color: inherit !imporatant;
242+ background: transparent;
243+ }
244+ </PRE>
245+
246+ </div>
247+
248+
249+ <!-- Add another example?. Check out:
226250http://lists.w3.org/Archives/Member/w3c-css-wg/1998JanMar/0054.html
227- -IJ -->
251+ -IJ, HWL -->
228252
229253<H2><a name="at-import">The @import rule</a></h2>
230254
@@ -445,6 +469,7 @@ base) gives the specificity.
445469Some examples:
446470
447471<PRE>
472+ * {} /* a=0 b=0 c=0 -> specificity = 0 */
448473 LI {} /* a=0 b=0 c=1 -> specificity = 1 */
449474 UL LI {} /* a=0 b=0 c=2 -> specificity = 2 */
450475 UL OL+LI {} /* a=0 b=0 c=3 -> specificity = 3 */
@@ -485,7 +510,7 @@ STYLE element because of cascading rule 4.
485510than style sheets, for example the FONT element or the "align"
486511attribute in HTML. If so, the non-CSS presentational hints must be
487512translated to the corresponding CSS rules with specificity equal to
488- 1 . The rules are assumed to be at the start of the author style sheet
513+ zero . The rules are assumed to be at the start of the author style sheet
489514and may be overridden by subsequent style sheet rules.
490515
491516<div class="note">
@@ -495,6 +520,15 @@ stylistic attributes to coexist with style sheets.
495520</em>
496521</div>
497522
523+ <div class="note">
524+ <P><em><strong>Note.</strong>
525+ In CSS1, the non-CSS presentational hints were given a specificity
526+ equal to 1, not 0. The change is due to the introduction of the
527+ universal selector which has a specificity of 0.
528+ </em>
529+ </div>
530+
531+
498532</BODY>
499533</html>
500534<!-- Keep this comment at the end of the file
@@ -507,3 +541,4 @@ sgml-nofill-elements:("pre" "style" "br")
507541sgml-live-element-indicator:t
508542End:
509543-->
544+
0 commit comments