Lets see another way:

:host::shadow::content .my {color: yellow}

If we read the css ...we are definining a rule that applies to any '.my' 
class that is included in a content insertion point that is contained by a 
shadowRoot object inside our host element('my-child').

This is why I would do approach the goal. 

Now back to your question, I think you may have found a crack. Im not sure. 
Id encourage you put out there for stackoverflow and may be open an issue 
in the github repo. Id love to know as well if it is a bug.

And since you are playing with styles inheritance, have you checked out 
<core-style> . It is a very neat and simple way to distribute styles. It is 
like thinking in 'composition' of styles versus inheritance.

You should also checkout host-context which will allow you to determine a 
theme in a parent html element - say <body class="red-theme"> and based on 
that context determine different styles for each element.

On Monday, October 27, 2014 5:27:28 PM UTC-5, Claudius Nicolae wrote:
>
> Thanks for your reply Santiago.
> Wouldn't it be nice if the styles  would be inherited too ?
>
> On  another note, I have the following beef (issue, bug?):
> In a child (inheritance) element, ::content selectors need to be doubled.
> See the sample code:
> https://gist.github.com/clyfe/1bc824479eb2d29c3d13
>
> Is this a bug or expected behavior?
> If bug on what repo should I fill ?
>
> luni, 27 octombrie 2014, 13:03:00 UTC+2, Claudius Nicolae a scris:
>>
>> Let's say element B extends A.
>>
>>     <polymer-element name="A">
>>       <template>
>>         The property: {{property}}
>>       </template>
>>       <script>
>>         Polymer({ property: 'Property defined in A' });
>>       </script>
>>     </polymer-element>
>>
>>     <polymer-element name="B" extends="A">
>>       <template>
>>         <!--shadow></shadow--> <!-- NO shadow! I want my own completely 
>> different template! -->
>>         My own template, with binding: {{property}}
>>       </template>
>>       <script>
>>         Polymer(); // no overrides here
>>       </script>
>>     </polymer-element>
>>
>> 1. (templating)
>> Can B have it's own template without calling "<shadow></shadow>" ?
>> If yes, will properties and events defined in A be bound the B's new 
>> template ?
>>
>> 2. (styling)
>> Will styles defined for A apply to B, now that the tag name has changed ?
>> If yes, how much of them? Only those defined on :host, or also those 
>> involving the "A" tag name ?
>>
>> Thanks.
>>
>

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/3cab3ca8-b100-453f-bac9-6a0f056c503a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to