Question about styling and applyAuthorStyles

81 views
Skip to first unread message

Dirk Soede

unread,
Feb 10, 2014, 2:14:15 PM2/10/14
to polym...@googlegroups.com
Hi,

I was upgrading a test application from an older polymer version and ran into an issue with styling inside custom elements. If would like to run Chrome Canary with "Web Platform features" turned on because it is really fast, but the styles inside elements are lost.

I made a test script to show the problem(http://jsbin.com/qataz/2/edit) . There is a tag at top level and one inside a wrapper tag. In Canary with WPF the inside tag does not get the right styles(x-tag itself and the inner "border" style) while in Chrome with WPF it works correctly.

BTW i think it would be much more convenient to have the default value of applyAuthorStyles set to true. A lot more developers will use web components to structure their own application rather than build components of which the inner html must be shielded for outside styling.

Dirk

Eric Bidelman

unread,
Feb 10, 2014, 6:58:56 PM2/10/14
to Dirk Soede, polymer-dev
Hi Dirk,

`applyAuthorStyles` was recently removed from the Shadow DOM spec and Canary (with the WP flag) has been updated to reflect that. The docs haven't been updated since taht happened, so apologies for the confusion.

The recommendation is to load your shared styles in the element definition using a stylesheet or use ^ and ^^ * to style nodes from the outside. There's more in depth discussion in a previous thread:
  

*Note: based on feedback from the css-wg, ^ and ^^ are likely to to change names very soon. We'll keep this list posted when that happens.


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/741c7f8d-c9c1-4074-bafe-2856926e7aaf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages