I'm starting to use Angular 2 and I am using an admin template from Themeforest for styling. I want my component to take the styles defined on the index.html, which should be global. The problem is that the elements inside a components html file are not finding these styles, and I think that it is because somehow the parent-child relationship is broken. Here's an example:
In the index.html file, I have the following:
...
<!-- This is my Component -->
<sidebar-menu></sidebar-menu>
<!-- This is coded directly on the index.html -->
<li class="m-t-30">
<a href="#" class="detailed">
<span class="title">Page 1</span>
<span class="details">234 notifications</span>
</a>
<span class="icon-thumbnail "><i class="pg-mail"></i></span>
</li>
...
My <sidebar-menu> component has this on it's .html file:
<li class="m-t-30">
<a href="#" class="detailed">
<span class="title">Page 1</span>
<span class="details">234 notifications</span>
</a>
<span class="icon-thumbnail "><i class="pg-mail"></i></span>
</li>
Which is exactly the same as what is present on the index.html file. So, I should see the two items displayed in the same way. But this is what I see:
Clearly, the styling is broken, even though that both the component's html and the element's html are the same. Using the inspector, I can see that the component's html is not using the same styling as the second element:
Second element's inspected title:

I tried defining encapsulation: ViewEncapsulation.None on my Component, but it doesn't do anything. Any ideas on how to solve this? Thanks!


!importantfor those properties.