Looks like this is just inheriting style ('color' property) from the shadow
host (in this case, <test-element>)
to its shadow root.

.on * {
    color: red;
}

Can be applied to the shadow host element (<test-element>) as * matches any
element.
Then any element under the shadow root also inherit the property.

Please try

.on * {
    border: 1px solid red;
}

instead of 'color' property.  'border' property doesn't inherit.

Each element under '.on' class will have red border, thus you should see
red border around <test-element>, but you should not see borders in
each element under the shadow root.



On Fri, Aug 22, 2014 at 1:39 PM, Walter Rumsby <[email protected]> wrote:

> As per http://jsfiddle.net/wrumsby/6uLj91e5/ we noticed that * rules
> pierce the shadow boundary which seems to lessen the encapsulation provided
> by the Shadow DOM.
>
> I'm unsure if this is intentional, a case not considered (in Polymer or
> the spec) or a bug in implementation (Chrome 36.0.1985.143; Firefox 31.0).
>
> Here's a GIF showing what happens in case this test case no longer works
> as described - http://g.recordit.co/hr3H3J9jM5.gif
>
>  Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/6e3e1aba-5973-4c42-af6d-490adf6f6cb5%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/6e3e1aba-5973-4c42-af6d-490adf6f6cb5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Takayoshi Kochi

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CADP2%3DhoAtye-vjfJnAh_Q1Z2HvLnVkxtia0EyQQ11XfL_K8htA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to