(Safari Firefox IE) Styles Bleeding In.

161 views
Skip to first unread message

danch...@googlemail.com

unread,
May 23, 2014, 12:21:12 PM5/23/14
to polym...@googlegroups.com
I have been furthering my investigations into polymer so far so good but I have been thrown a little sideways,
To my knowledge styles cannot bleed out of a custom element and applyAuthorStyles is now deprecated so styles cannot bleed in unless using ::shadow / deep piercings.

This is the case with chrome but testing with Safari Firefox IE10 I get different results the styles defined within my global css leak into my custom elements. Is this the correct behaviour. Is it something todo with chrome implementing shadow dom polymer filling in for the other browsers?

Regards

Da.

Steve Orvell

unread,
May 23, 2014, 12:23:03 PM5/23/14
to danch...@googlemail.com, polym...@googlegroups.com
 Is it something todo with chrome implementing shadow dom polymer filling in for the other browsers?

That's correct.  


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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/b809c2f8-2891-404d-b9d0-88005503b8dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Orvell

unread,
May 23, 2014, 12:30:36 PM5/23/14
to danch...@googlemail.com, polym...@googlegroups.com
Oops, mistakenly hit send there (darn gmail). I meant to say, this is correct. 

Polymer provides an approximation shim for the style encapsulation ShadowDOM provides, and what you're seeing is one negative side effect: styles leak 'in' to polyfilled shadowRoot's. Unfortunately, polyfilling styles correctly would make performance unacceptable.

As a result, on polyfilled platforms, you'll need to take care to use selectors that do not leak into polyfilled shadowRoots.

Eric Bidelman

unread,
May 23, 2014, 12:45:26 PM5/23/14
to Steve Orvell, danch...@googlemail.com, polym...@googlegroups.com

Daniel Chin

unread,
May 23, 2014, 12:46:02 PM5/23/14
to polym...@googlegroups.com, danch...@googlemail.com
Thanks for the response Steve 

I am thinking of using polymer in our application going forward, We have got a css framework for our existing so this is very useful to know before jumping in :)

Regards

Dan 
Reply all
Reply to author
Forward
0 new messages