Skip to content

Commit 41becac

Browse files
authored
[css-cascade-6] Remove (defer) scoped descendant combinator (w3c#8718)
w3c#8628, w3c#8380
1 parent d6dc068 commit 41becac

File tree

1 file changed

+3
-50
lines changed

1 file changed

+3
-50
lines changed

css-cascade-6/Overview.bs

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -669,56 +669,6 @@ Scope Nesting</h4>
669669
(e.g. within ''@layer'')
670670
are [=scoped style rules|scoped=].
671671

672-
<h3 id="scope-combinator">
673-
Scoped Descendant Combinator</h3>
674-
675-
The <dfn export>scoped descendant combinator</dfn>
676-
describes a descendant relationship between two elements.
677-
A selector of the form ''A >> B'' represents
678-
an element <code>B</code> that is an arbitrary descendant
679-
of some ancestor element <code>A</code>.
680-
681-
This combinator differs from the [=descendant combinator=]
682-
in that it applies [=weak scoping proximity=]
683-
to the relationship between <css>A</css> and <css>B</css>.
684-
It does not change the '':scope'' element.
685-
686-
ISSUE: Should the [=scoped descendant combinator=]
687-
use strong or weak scoping proximity?
688-
Should it even exist?
689-
It's defined here to work the way many people expected
690-
the regular [=descendant combinator=] to work...
691-
692-
<div class="example">
693-
This means that style rules using the [=scoped descendant combinator=]
694-
are sorted by specificity just like the regular [=descendant combinator=],
695-
except that when their specificities are equal
696-
the more tightly-scoped declaration wins.
697-
698-
In this example
699-
the <code>&lt;a></code> element's color will be determined
700-
by the nearest ancestor with either
701-
a ''light-scheme'' or ''dark-scheme'' class.
702-
(If the descendant selector had been used,
703-
its color would always be ''plum'',
704-
because it is later in the source order.)
705-
706-
<pre>
707-
.light-scheme >> a { color: darkmagenta; }
708-
.dark-scheme >> a { color: plum; }
709-
</pre>
710-
711-
However if the <code>&lt;a></code> element has a ''light-scheme''
712-
ancestor and is focused,
713-
its color will be ''teal''
714-
even if it has a nearer ''dark-scheme'' ancestor,
715-
because there is no equivalent ''dark-scheme'' rule.
716-
717-
<pre>
718-
.light-scheme >> a:focus { color: teal; }
719-
</pre>
720-
</div>
721-
722672
<h3 id="preshint">
723673
Precedence of Non-CSS Presentational Hints</h3>
724674

@@ -804,6 +754,9 @@ Changes since the 21 December 2021 First Public Working Draft</h3>
804754
* Disallowed [=pseudo-elements=] in the ''@scope'' prelude.
805755
(<a href="https://github.com/w3c/csswg-drafts/issues/7382">Issue 7382</a>)
806756

757+
* Removed the scoped descendant combinator (deferred).
758+
(<a href="https://github.com/w3c/csswg-drafts/issues/8628">Issue 8628</a>)
759+
807760
* Removed selector scoping notation.
808761
(<a href="https://github.com/w3c/csswg-drafts/issues/7709">Issue 7709</a>)
809762

0 commit comments

Comments
 (0)