This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The exception that a /select/ combinator applies to DOM elements outside the shadow tree, i.e., elements distributed to insertion points (and presumably their descendants), as described in [5.4], is not reflected in the style application rules in [7].
This comment is related: <https://www.w3.org/Bugs/Public/show_bug.cgi?id=17590#c2>
I think I've wandered into some ambiguity here, would appreciate advice on how to fix this. The fact that the rule applies or does not apply in a given subtree is orthogonal to whether or not this rule can select elements from any other subtree or not.
Closing for now unless you guys pipe in and say that I shouldn't.
I think this should be reopened. I’m pasting my comment from <https://www.w3.org/Bugs/Public/show_bug.cgi?id=17590#c2> here: (snip) The spec contains this language: "CSS rules declared in a shadow DOM subtree must not apply in the document tree" I think an exception needs to be carved out for @host rules and rules using /select/. There is a quasi-exception in the form of a conflicting requirement for @host: "The declarations in the @host @-rule must be applied to the shadow host of the shadow DOM subtree in which the style is specified." But I think the first requirement needs to be articulated to mention @host and /select/. It would be nice if the CSS application algorithm could specify all of this too. (/snip) As it stands it seems like content /select/ .foo can be optimized to a no-op, because irregardless of what the selector matches, it is outside of the shadow subtree, so it must not apply.
Clearly I need to be more clear in the spec.
http://dvcs.w3.org/hg/webcomponents/rev/be8a6942330c Whew! This was harder than I originally thought!