Skip to content

Commit e01e6ea

Browse files
committed
many changes
1 parent 5583fc2 commit e01e6ea

1 file changed

Lines changed: 51 additions & 46 deletions

File tree

css3-cascade/Overview.src.html

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ <h2 class="no-num no-toc">Abstract</h2>
5050
<p>This CSS3 module describes how to find a value for every
5151
element/property combination in a document. Values either come from
5252
style sheets or the property's initial value. By way of cascading and
53-
inheritance, values are propagated to all element/property
54-
combinations. The output of the computations described in this module
55-
is the <em>specified value</em>.
53+
inheritance, values are propagated to all properties on all elements.
54+
55+
<p>This module interfaces with several other modules. It relies on
56+
[[!CSS3SYN]] to parse the style sheets, on [[!SELECT]] to calculate
57+
specificity, and on [[!MEDIAQ]] to determine if a declaration applies
58+
to the media. The output from this module is a <em>specified
59+
value</em> for all element/property combinations. The processing of
60+
specified values is described in [[!CSS3VAL]].
5661

57-
<!--
58-
The input to the computations described in this module
59-
is a set of style sheets of style sheets
60-
-->
6162

6263
<h2 class="no-num no-toc">Status of this document</h2>
6364

@@ -93,29 +94,6 @@ <h2 class="no-num no-toc">Table of contents</h2>
9394

9495
<hr>
9596

96-
<h2>Dependencies on other modules</h2>
97-
98-
<p>This CSS3 module depends on the following other CSS3 modules:
99-
100-
<ul>
101-
<li>Selectors [[!SELECT]], which describes <strong class="index">specificity</strong>
102-
103-
<li>Syntax [[!CSS3SYN]], which describes how to parse CSS style sheets
104-
105-
<!-- into <strong title="declaration" class="index">declarations</strong>-->
106-
107-
<li>Media Queries [[!MEDIAQ]], which describe how to restrict style
108-
sheets to certain types of devices.
109-
110-
</ul>
111-
112-
<p>It has non-normative references to the following other CSS3
113-
modules:</p>
114-
115-
<ul>
116-
<li>Values and Units [[!CSS3VAL]], which describes the computation from
117-
specified through computed to actual values</li>
118-
</ul>
11997

12098

12199
<h2>Introduction</h2>
@@ -140,23 +118,39 @@ <h2>Input and output of this module</h2>
140118
<p>The input to the computations described in this module is:
141119

142120
<ul>
143-
<li>The set of declarations that apply to the element/property combination in
144-
question. It is assumed that declarations that do not apply (e.g. due to the
145-
media type, or user selection of style sheets) is not included in the set.
146121

147-
<li>The inherited value of the property.
122+
<li>a set of parsed style sheets
123+
124+
<li>the initial value of each property
125+
126+
<li>the title of the preferred style sheet (if any)
148127

149-
<li>The initial value of the property.
150128
</ul>
151129

152-
<p>The output of the computations described in this module is a single
153-
value for all element/property combinations. This value is called
154-
the <dfn>specified value</dfn>.
130+
<p>The output of the computations described in this module is a
131+
specified value for all properties on all elements and page/margin
132+
boxes. The specified value is found by first forming an ordered list
133+
with all rules that apply to the document:
155134

156-
<p>The specified value is found by using the following pseudo-algorithm:
135+
<ol>
136+
137+
<li>Media Queries [[!MEDIAQ]] are used to remove statements with media
138+
queries that are false in the given context.
139+
140+
<li>From the remaining @import statements, those that do not match the
141+
title of the preferred style sheet (if any) are removed (described
142+
in <a href="#import">Importing style sheets</a> below)
143+
144+
<li>All remaining @import rules are expanded.
145+
146+
</ol>
147+
148+
<p>Then, for every element and every page/margin box, the value for each property can be found by following this pseudo-algorith:
157149

158150
<ol>
159151

152+
<li>Identify all declarations that apply to the element (as described in [[!SELECT]]) or the page/margin box (as described in [[CSS3PAGE]]).
153+
160154
<li>If the cascading process (described below) yields a winning
161155
declaration and the value of the winning declaration is not ''initial''
162156
or ''inherit'', the value of the winning declaration becomes the
@@ -176,11 +170,12 @@ <h2>Input and output of this module</h2>
176170
</ol>
177171

178172
<p>The specified value may need some computation before it can be
179-
used. This is described in the values are described in the <a href="/TR/css3-values">Values and
173+
used. This is described in the <a href="/TR/css3-values">Values and
180174
Units</a> [[!CSS3VALUES]] module.
181175

182-
<h2 id="at-import">Style sheets including other style sheets:
183-
the <code>@import</code> rule</h2>
176+
177+
178+
<h2 id="at-import">Importing style sheets</h2>
184179

185180
<p class="issue">[When this section is rewritten to define user agent
186181
conformance more clearly, it should state that (1) the media list
@@ -344,8 +339,7 @@ <h2 id="at-import">Style sheets including other style sheets:
344339
a keyword or some punctuation? E.g., '@import url(foo.css) as
345340
"Boxed"'.
346341

347-
<h2 id="at-media-rule">Rules for specific media: the
348-
<code>@media</code> rule</h2>
342+
<h2 id="at-media-rule">Rules for specific media: the <code>@media</code> rule</h2>
349343

350344
<p>An <dfn>@media</dfn> rule specifies the target media types
351345
(separated by commas) of a set of rules (delimited by curly braces).
@@ -488,8 +482,19 @@ <h2>Inheritance</h2>
488482
<p>Inheritance is a way of propagating property values from parent
489483
elements to their children. Inheritance means that the specified value
490484
of a given element/property combination is copied from the computed
491-
value of the parent element. The root element, which has no parent
492-
element, inherits the initial value of the property.
485+
value of the parent element.
486+
487+
<p>
488+
489+
<ul>
490+
<li>The root element, which has no parent element, inherits the initial value of the property.
491+
<li>The page box inherits from the inherits the initial value
492+
<li>Margin boxes inherit from the page box
493+
<li>pseudo-elements inherit according to the fictional tag sequence [[!SELECT]]
494+
<li>pseudo-classes inherit from its parent
495+
496+
</ul>
497+
493498

494499
<p>Some properties are said to be <dfn
495500
title="inheritance">inherited</dfn>. This means that,

0 commit comments

Comments
 (0)