Skip to content

Commit 081014b

Browse files
authored
[css-cascade-6] Remove strong scoping proximity (w3c#8719)
w3c#6790
1 parent 41becac commit 081014b

File tree

1 file changed

+8
-30
lines changed

1 file changed

+8
-30
lines changed

css-cascade-6/Overview.bs

+8-30
Original file line numberDiff line numberDiff line change
@@ -140,35 +140,22 @@ Cascade Sorting Order</h3>
140140
Note: This follows the same logic used for precedence of [=normal=] and [=important=] [=origins=],
141141
thus the ''!important'' flag maintains the same “override” purpose in both settings.
142142

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-
156143
<dt id='cascade-specificity'>Specificity
157144
<dd>
158145
The <a href="https://www.w3.org/TR/selectors/#specificity">Selectors module</a> [[!SELECT]] describes how to compute the specificity of a selector.
159146
Each declaration has the same specificity as the style rule it appears in.
160147
The declaration with the highest specificity wins.
161148

162-
<dt id='cascade-proximity-weak'><dfn>Weak Scoping Proximity</dfn>
149+
<dt id='cascade-proximity'><dfn>Scoping Proximity</dfn>
163150
<dd>
164151
If two declarations both have elements
165152
selected by scoped descendant relationships
166-
applying [=weak scoping proximity=],
153+
applying [=scoping proximity=],
167154
then the declaration with the fewest generational hops
168155
between the ancestor/descendant element pair wins.
169156

170157
If multiple such pairs are represented,
171-
their [=weak scoping proximity=] weights are compared
158+
their [=scoping proximity=] weights are compared
172159
from innermost scoping relationship to outermost scoping relationship
173160
(with any missing pairs weighted as infinity).
174161

@@ -191,8 +178,6 @@ Cascade Sorting Order</h3>
191178
</ul>
192179
</dl>
193180

194-
Issue(6790): Does <dfn>scope proximity</dfn> belong above or below specificity in the cascade?
195-
196181
The <dfn export>output of the cascade</dfn>
197182
is a (potentially empty) sorted list of <a>declared values</a> for each property on each element.
198183

@@ -328,20 +313,10 @@ Effects of ''@scope''</h4>
328313
* The [=cascade=] prioritizes declarations
329314
with a [=scope proximity|more proximate=] [=scoping root=],
330315
regardless of specificity or source order
331-
by applying [=weak scoping proximity=]
316+
by applying [=scoping proximity=]
332317
between the [=scoping root=] and the [=subject=] of each [=scoped style rule=].
333318
<!-- This causes declarations [insert appropriate sentence from issue below]. -->
334319

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-
345320
Note: Unlike <a href="https://www.w3.org/TR/css-nesting/">Nesting</a>,
346321
selectors within an ''@scope'' rule
347322
do not acquire the specificity of any parent selector(s) in the ''@scope'' prelude.
@@ -361,7 +336,7 @@ Effects of ''@scope''</h4>
361336
is not applied to the specificity of the scoped selector.
362337
However, since one <{img}> selector is scoped,
363338
that selector is weighted more strongly in the cascade
364-
with the application of [=weak scoping proximity=].
339+
with the application of [=scoping proximity=].
365340
</div>
366341

367342
<div class=example>
@@ -736,6 +711,9 @@ Changes since the 21 December 2021 First Public Working Draft</h3>
736711
Significant changes since the
737712
<a href="https://www.w3.org/TR/2021/WD-css-cascade-6-20211221/">21 December 2021 First Public Working Draft</a> include:
738713

714+
* Removed strong scoping proximity.
715+
(<a href="https://github.com/w3c/csswg-drafts/issues/6790">Issue 6790</a>)
716+
739717
* Clarified ''@scope'' effects on nested '':scope'' and ''&'' selectors.
740718
(<a href="https://github.com/w3c/csswg-drafts/issues/8377">Issue 8377</a>)
741719

0 commit comments

Comments
 (0)