This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17674 - [Shadow]: /select/ combinator not included in rule applicability algorithm
Summary: [Shadow]: /select/ combinator not included in rule applicability algorithm
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 16009
  Show dependency treegraph
 
Reported: 2012-07-03 05:44 UTC by Roland Steiner
Modified: 2012-08-03 21:43 UTC (History)
1 user (show)

See Also:


Attachments

Description Roland Steiner 2012-07-03 05:44:03 UTC
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].
Comment 1 Dominic Cooney 2012-07-03 06:10:59 UTC
This comment is related:

<https://www.w3.org/Bugs/Public/show_bug.cgi?id=17590#c2>
Comment 2 Dimitri Glazkov 2012-07-26 22:36:39 UTC
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.
Comment 3 Dimitri Glazkov 2012-07-27 18:21:32 UTC
Closing for now unless you guys pipe in and say that I shouldn't.
Comment 4 Dominic Cooney 2012-07-30 00:36:52 UTC
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.
Comment 5 Dimitri Glazkov 2012-07-30 21:49:45 UTC
Clearly I need to be more clear in the spec.
Comment 6 Dimitri Glazkov 2012-08-03 21:43:58 UTC
http://dvcs.w3.org/hg/webcomponents/rev/be8a6942330c

Whew! This was harder than I originally thought!