Canary shadowdom styling issue

62 views
Skip to first unread message

akhile...@gmail.com

unread,
Mar 6, 2014, 1:53:08 PM3/6/14
to polym...@googlegroups.com
Running into an issue while using ^^ symbols for styling Shadow DOM using Canary with "Experimental Web Platform" enabled. The styles are not penetrating through to the child nodes. This seems to work fine with polyfill.


Is there something that I am missing or is that a bug with native Shadom DOM implementation?

Daniel Freedman

unread,
Mar 6, 2014, 1:58:49 PM3/6/14
to Akhilesh Gupta, polymer-dev
Works for me with Version 35.0.1873.0 canary, but not in Version 35.0.1874.2 canary


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/09c57583-4947-46d7-b446-ecc8b1f0939d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Steve Orvell

unread,
Mar 6, 2014, 2:14:09 PM3/6/14
to Daniel Freedman, Akhilesh Gupta, polymer-dev
^ has changed to /shadow/
^^ has changed to /shadow-all/

Here's an example to see what's working:

http://jsbin.com/pofefune/1/edit


Daniel Freedman

unread,
Mar 6, 2014, 2:28:28 PM3/6/14
to Steve Orvell, Akhilesh Gupta, polymer-dev
The Shadow styling syntax has been split out into its own spec in the css working group, which has decided on /shadow/ and /shadow-deep/, (which is just a search/replace of ^ and ^^):

akhile...@gmail.com

unread,
Mar 11, 2014, 2:42:15 PM3/11/14
to polym...@googlegroups.com, Steve Orvell, Akhilesh Gupta
Thanks guys! /shadow-deep/ selector solves the problem on canary and also with latest polyfills.

But I have just encountered another issue with latest canary and native shadow dom. The @font-face definitions are not penetrating into all the child elements and their shadow doms. It seems to be only getting applied if @font-face is defined at the global document level. Is that expected or a bug?

Steve Orvell

unread,
Mar 11, 2014, 2:49:20 PM3/11/14
to Akhilesh Gupta, polym...@googlegroups.com
Yeah, that's a known bug:


@font-face needs to be global right now. You can, for example, include rules with @font-face inside a style element that you include in an HTMLImport.
Reply all
Reply to author
Forward
0 new messages