@@ -140,35 +140,22 @@ Cascade Sorting Order</h3>
140
140
Note: This follows the same logic used for precedence of [=normal=] and [=important=] [=origins=] ,
141
141
thus the ''!important'' flag maintains the same “override” purpose in both settings.
142
142
143
- <dt id='cascade-proximity-strong'> <dfn>Strong Scoping Proximity</dfn>
144
- <dd>
145
- If two declarations both have elements
146
- selected by scoped descendant relationships
147
- applying [=strong scoping proximity=] ,
148
- then the declaration with the fewest generational hops
149
- between the ancestor/descendant element pair wins.
150
-
151
- If multiple such pairs are represented,
152
- their [=strong scoping proximity=] weights are compared
153
- from innermost scoping relationship to outermost scoping relationship
154
- (with any missing pairs weighted as infinity).
155
-
156
143
<dt id='cascade-specificity'> Specificity
157
144
<dd>
158
145
The <a href="https://www.w3.org/TR/selectors/#specificity">Selectors module</a> [[!SELECT]] describes how to compute the specificity of a selector.
159
146
Each declaration has the same specificity as the style rule it appears in.
160
147
The declaration with the highest specificity wins.
161
148
162
- <dt id='cascade-proximity-weak '> <dfn>Weak Scoping Proximity</dfn>
149
+ <dt id='cascade-proximity'> <dfn>Scoping Proximity</dfn>
163
150
<dd>
164
151
If two declarations both have elements
165
152
selected by scoped descendant relationships
166
- applying [=weak scoping proximity=] ,
153
+ applying [=scoping proximity=] ,
167
154
then the declaration with the fewest generational hops
168
155
between the ancestor/descendant element pair wins.
169
156
170
157
If multiple such pairs are represented,
171
- their [=weak scoping proximity=] weights are compared
158
+ their [=scoping proximity=] weights are compared
172
159
from innermost scoping relationship to outermost scoping relationship
173
160
(with any missing pairs weighted as infinity).
174
161
@@ -191,8 +178,6 @@ Cascade Sorting Order</h3>
191
178
</ul>
192
179
</dl>
193
180
194
- Issue(6790): Does <dfn>scope proximity</dfn> belong above or below specificity in the cascade?
195
-
196
181
The <dfn export>output of the cascade</dfn>
197
182
is a (potentially empty) sorted list of <a>declared values</a> for each property on each element.
198
183
@@ -328,20 +313,10 @@ Effects of ''@scope''</h4>
328
313
* The [=cascade=] prioritizes declarations
329
314
with a [=scope proximity|more proximate=] [=scoping root=] ,
330
315
regardless of specificity or source order
331
- by applying [=weak scoping proximity=]
316
+ by applying [=scoping proximity=]
332
317
between the [=scoping root=] and the [=subject=] of each [=scoped style rule=] .
333
318
<!-- This causes declarations [insert appropriate sentence from issue below] . -->
334
319
335
- Issue(6790): Should ''@scope'' use strong or weak scoping proximity?
336
- [=Strong scoping proximity=] causes declarations to be weighted more strongly
337
- by scope proximity than by their selector’s specificity.
338
- [=Weak scoping proximity=] causes declarations of the same specificity
339
- to be weighted by proximity to their scoping root
340
- before falling back to source ordering,
341
- but declarations of higher specificity win over more tightly-scoped declarations.
342
- The Working Group currently leans towards weak proximity,
343
- and recommends that as a starting point for prototypes.
344
-
345
320
Note: Unlike <a href="https://www.w3.org/TR/css-nesting/">Nesting</a> ,
346
321
selectors within an ''@scope'' rule
347
322
do not acquire the specificity of any parent selector(s) in the ''@scope'' prelude.
@@ -361,7 +336,7 @@ Effects of ''@scope''</h4>
361
336
is not applied to the specificity of the scoped selector.
362
337
However, since one <{img}> selector is scoped,
363
338
that selector is weighted more strongly in the cascade
364
- with the application of [=weak scoping proximity=] .
339
+ with the application of [=scoping proximity=] .
365
340
</div>
366
341
367
342
<div class=example>
@@ -736,6 +711,9 @@ Changes since the 21 December 2021 First Public Working Draft</h3>
736
711
Significant changes since the
737
712
<a href="https://www.w3.org/TR/2021/WD-css-cascade-6-20211221/">21 December 2021 First Public Working Draft</a> include:
738
713
714
+ * Removed strong scoping proximity.
715
+ (<a href="https://github.com/w3c/csswg-drafts/issues/6790">Issue 6790</a> )
716
+
739
717
* Clarified ''@scope'' effects on nested '':scope'' and ''&'' selectors.
740
718
(<a href="https://github.com/w3c/csswg-drafts/issues/8377">Issue 8377</a> )
741
719
0 commit comments