Skip to content

Commit 95c2bfa

Browse files
committed
[css-cascade-4][css-cascade-5] Sync levels
1 parent d67df22 commit 95c2bfa

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

css-cascade-4/Overview.bs

+14-10
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Introduction</h2>
8484
Properties values are assigned to various parts of the document
8585
via [=property declarations=],
8686
which assign the property a value
87-
(e.g. ''red'', ''12pt'', ''border/dotted'')
87+
(e.g. ''red'', ''12pt'', ''border-style/dotted'')
8888
for the associated element or box.
8989

9090
One of the fundamental design principles of CSS is <a lt="cascade">cascading</a>,
@@ -160,13 +160,14 @@ Importing Style Sheets: the ''@import'' rule</h2>
160160

161161
<pre class='prod'>
162162
@import [ <<url>> | <<string>> ]
163-
[ supports( [ <<supports-condition>> | <<declaration>> ] ) ]?
164-
<<media-query-list>>? ;</pre>
163+
<<import-conditions>> ;
164+
165+
<dfn export>&lt;import-conditions></dfn> = [ supports( [ <<supports-condition>> | <<declaration>> ] ) ]?
166+
<<media-query-list>>?</pre>
165167

166168
where the <<url>> or <<string>> gives the URL of the style sheet to be imported,
167-
and the optional [<<supports-condition>>|<<declaration>>] and <<media-query-list>>
168-
(collectively, the <dfn export>import conditions</dfn>)
169-
state the conditions under which it applies.
169+
and the optional <<import-condition>>
170+
state the [=import conditions=] under which it applies.
170171

171172
<div class="example">
172173
The following <a href="#conditional-import">conditional <css>@import</css> rule</a>
@@ -195,7 +196,7 @@ Importing Style Sheets: the ''@import'' rule</h2>
195196
<h3 id=conditional-import>
196197
Conditional ''@import'' Rules</h3>
197198

198-
The <a>import conditions</a> allow the import to be media&ndash; or feature-support&ndash;dependent.
199+
<dfn export>Import conditions</dfn> allow the import to be media&ndash; or feature-support&ndash;dependent.
199200
In the absence of any <a>import conditions</a>, the import is unconditional.
200201
(Specifying ''@media/all'' for the <<media-query-list>> has the same effect.)
201202
If the <a>import conditions</a> do not match,
@@ -226,7 +227,7 @@ Conditional ''@import'' Rules</h3>
226227
<pre class='lang-css'>
227228
@import url("fallback-layout.css") supports(not (display: flex));
228229
@supports (display: flex) {
229-
...
230+
...
230231
}
231232
</pre>
232233
</div>
@@ -984,7 +985,7 @@ Cascade Sorting Order</h3>
984985
<dt id='cascade-specificity'>Specificity
985986
<dd>
986987
The <a href="https://www.w3.org/TR/selectors/#specificity">Selectors module</a> [[!SELECT]] describes how to compute the specificity of a selector.
987-
Each declaration has the same specificity as the style rule it appears in.
988+
Each [=declaration=] has the same specificity as the style rule it appears in.
988989
For the purpose of this step,
989990
declarations that do not belong to a style rule
990991
(such as the <a href="https://www.w3.org/TR/css-style-attr/#interpret">contents of a style attribute</a>)
@@ -993,10 +994,12 @@ Cascade Sorting Order</h3>
993994

994995
<dt id='cascade-order'>Order of Appearance
995996
<dd>
996-
The last declaration in document order wins.
997+
The last [=declaration=] in document order wins.
997998
For this purpose:
998999

9991000
<ul>
1001+
<li>Style sheets are ordered
1002+
in [[final CSS style sheets]] order.
10001003
<li>Declarations from <a at-rule lt="@import">imported style sheets</a>
10011004
are ordered as if their style sheets were substituted in place of the ''@import'' rule.
10021005
<li>Declarations from style sheets independently linked by the originating document
@@ -1314,6 +1317,7 @@ Non-trivial changes since the <a href="https://www.w3.org/TR/2022/CR-css-cascade
13141317

13151318
<!-- to 11 Jan 2022 -->
13161319
* Clarify that all “aliases” of a property are reverted by ''revert''.
1320+
* Clarify that style sheets are ordered in [[final CSS style sheets]] order.
13171321

13181322
<h3 id="changes-2021-10">
13191323
Changes since the 15 Oct 2021 Working Draft</h3>

css-cascade-5/Overview.bs

+9-7
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ Importing Style Sheets: the ''@import'' rule</h2>
139139
[ layer | layer(<<layer-name>>) ]?
140140
<<import-condition>> ;
141141
142-
<dfn export>&lt;import-condition></dfn> = [ supports( [ <<supports-condition>> | <<declaration>> ] ) ]?
143-
<<media-query-list>>? ;</pre>
142+
<dfn export>&lt;import-conditions></dfn> = [ supports( [ <<supports-condition>> | <<declaration>> ] ) ]?
143+
<<media-query-list>>?</pre>
144144

145145
where:
146146

@@ -158,8 +158,8 @@ Importing Style Sheets: the ''@import'' rule</h2>
158158
(just as if declared by an ''@layer'' rule wrapped
159159
in the appropriate [=conditional group rules=]).
160160

161-
* the optional <<import-condition>>
162-
states the conditions under which it applies.
161+
* the optional <<import-conditions>>
162+
states the [=import conditions=] under which it applies.
163163

164164
<div class="example">
165165
The following <a href="#conditional-import">conditional <css>@import</css> rule</a>
@@ -198,7 +198,7 @@ Importing Style Sheets: the ''@import'' rule</h2>
198198
<h3 id=conditional-import>
199199
Conditional ''@import'' Rules</h3>
200200

201-
The <a>import conditions</a> allow the import to be media&ndash; or feature-support&ndash;dependent.
201+
<dfn export>Import conditions</dfn> allow the import to be media&ndash; or feature-support&ndash;dependent.
202202
In the absence of any <a>import conditions</a>, the import is unconditional.
203203
(Specifying ''@media/all'' for the <<media-query-list>> has the same effect.)
204204
If the <a>import conditions</a> do not match,
@@ -474,7 +474,7 @@ Value Processing</h2>
474474

475475
Once a user agent has parsed a document and constructed a document tree,
476476
it must assign,
477-
to every element in the tree,
477+
to every element in the [=flat tree=],
478478
and correspondingly to every box in the formatting structure,
479479
a value to every property that applies to the target media type.
480480

@@ -1056,7 +1056,8 @@ Cascade Sorting Order</h3>
10561056
For this purpose:
10571057

10581058
<ul>
1059-
<li>Style sheets are ordered as in <a href="https://drafts.csswg.org/cssom/#documentorshadowroot-final-css-style-sheets">final CSS style sheets</a>.
1059+
<li>Style sheets are ordered
1060+
in [[final CSS style sheets]] order.
10601061
<li>Declarations from <a at-rule lt="@import">imported style sheets</a>
10611062
are ordered as if their style sheets were substituted in place of the ''@import'' rule.
10621063
<li>Declarations from style sheets independently linked by the originating document
@@ -1996,6 +1997,7 @@ Non-trivial changes since the <a href="CSS Cascading and Inheritance Level 5">Ca
19961997

19971998
<!-- to 11 Jan 2022 -->
19981999
* Clarify that all “aliases” of a property are reverted by ''revert''/''revert-layer''.
2000+
* Clarify that style sheets are ordered in [[final CSS style sheets]] order.
19992001

20002002
<h3 id="changes-2021-10">
20012003
Changes since the 15 Oct 2021 Working Draft</h3>

0 commit comments

Comments
 (0)