I am using Polymer 1.0. I have a Polymer dom-module:
<parent-node></parent-node>
And I am filling the node with another of my own separate Polymer dom-module:
<parent-node>
<child-node></child-node>
</parent-node>
Now I want to set a boolean attribute on the parent-node that can make the child-nodes read and react. But as Polymer elements render from children first up to the parents last, can the child node read from the parent that it has the Boolean value of dark set to true?:
<parent-node dark>
<child-node></child-node> <!-- Can it read from the parent? -->
</parent-node>
I was hoping to use a way with the {{dark}} binding. Can the parent publish to the children?
Another way I was thinking that I could possibly achieve this is possibly through CSS in the <child-node> dom-module template. :host is great but is there a way for me to hit the parent of :host? So it could be some like (psuedo code):
:parent[dark] :host {
background: #000;
}
Alternatively, is there perhaps a way in the <parent-node> to hit specific children of <content></content>. Maybe Polymer allows piercing through the container of <content> to hit specific classes or ids?
Could anyone help? My current implementation requires the parent assigning Boolean attributes to the children but I feel this totally defeats the advantages of the templating and binding abilities of Polymer...