File tree 2 files changed +13
-14
lines changed
2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -789,6 +789,18 @@ Cascade Order</h3>
789
789
790
790
Declarations from <a>origins</a> earlier in this list win over declarations from later <a>origins</a> .
791
791
792
+ <dt id='cascade-context'> Context
793
+ <dd>
794
+ A document language can provide for blending declarations sourced
795
+ from different <dfn>encapsulation contexts</dfn> ,
796
+ such as the nested [=tree contexts=] of [=shadow trees=] in the [[!DOM]] .
797
+ When comparing two declarations
798
+ that are sourced from different [=encapsulation contexts=] ,
799
+ then for normal rules
800
+ the declaration in the outer context wins,
801
+ and for [=important=] rules
802
+ the declaration from the inner context wins.
803
+
792
804
<dt id='cascade-scope'> Scope
793
805
<dd>
794
806
A declaration can be <dfn export>scoped</dfn> to a subtree of the document
Original file line number Diff line number Diff line change @@ -435,20 +435,7 @@ Selecting Slot-Assigned Content: the ''::slotted()'' pseudo-element</h4>
435
435
<h3 id='shadow-cascading'>
436
436
Shadow Trees and the Cascade</h3>
437
437
438
- To address the desired cascading behavior of rules targetting elements in shadow roots,
439
- this specification extends the <a href="https://drafts.csswg.org/css-cascade/#cascading">cascade order</a>
440
- defined in the Cascade specification. [[!CSS3CASCADE]]
441
-
442
- An additional cascade criteria must be added,
443
- between Origin and Scope,
444
- called Shadow Tree.
445
-
446
- * When comparing two declarations
447
- that have different <a>tree contexts</a> ,
448
- then for normal rules the declaration earlier in the <a>shadow-including tree order</a> wins,
449
- and for important rules the declaration coming later in the <a>shadow-including tree order</a> wins.
450
-
451
- Note: This is the <em> opposite</em> of how scoped styles work.
438
+ See [[css-cascade-4#cascade-context]] .
452
439
453
440
<!--
454
441
████████ ██ ███ ████████ ████████ ████████ ████████ ████████
You can’t perform that action at this time.
0 commit comments