You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An element can have any number of <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a>,
157
157
which are ordered by creation time.
158
-
The most recently-createed<adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a> on an element
158
+
The most recently-created<adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a> on an element
159
159
is the <dfndata-dfn-type=dfndata-export="" id=active-shadow-tree>active shadow tree<aclass=self-linkhref=#active-shadow-tree></a></dfn> for that element.
160
160
161
161
<p> An element with a <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a> is a <dfndata-dfn-type=dfndata-export="" id=shadow-host>shadow host<aclass=self-linkhref=#shadow-host></a></dfn>.
Instead, the contents of the <adata-link-type=dfnhref=#active-shadow-treetitle="active shadow tree">active shadow tree</a> generates boxes
167
167
as if it were the contents of the element instead.
168
168
169
+
<p> All selectors appearing in a <adata-link-type=dfnhref=#shadow-treetitle="shadow tree">shadow tree</a>
170
+
are <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#scopetitle="scoped selectors">scoped selectors</a>,
171
+
with the <adata-link-type=dfnhref=#host-element0title="host element">host element</a> as their <adata-link-type=dfnhref=http://dev.w3.org/csswg/selectors-4/#scoping-roottitle="scoping root">scoping root</a>.
Changes to the Cascading Model</span><aclass=self-linkhref=#cascading></a></h2>
500
504
501
-
<p> Shadow DOM enables new ways to target an element and apply styles to it,
502
-
which don’t quite fit into the existing CSS cascade.
505
+
<p> When calculating <ahref=http://dev.w3.org/csswg/css-cascade/#cascade-order>cascade order</a>,
506
+
declarations in <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a> are ordered by creation time,
507
+
with younger <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a> treated as coming after older <adata-link-type=dfnhref=#shadow-treetitle="shadow trees">shadow trees</a>
508
+
within a given <adata-link-type=dfnhref=#host-element0title="host element">host element</a>.
I need to go look up what was decided/written down
506
-
for the cascading precedence
507
-
of rules from outside a shadow tree reaching in, via the /shadow-* combinators,
508
-
and of rules from inside a shadow tree reaching out, via the /content combinator.
509
-
Also, the cascading precedence of styles inside a shadow tree applying to a host element,
510
-
versus the outside document’s styles applying to the host element.
510
+
<pclass=note> Note: Note that styles in a shadow tree are <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-cascade-3/#scopedtitle=scoped>scoped</a> to their <adata-link-type=dfnhref=#host-element0title="host element">host element</a>,
0 commit comments