Suppose I have a component with this template:
<div class="frame">
<span class="user-defined-text">{{text}}</span>
</div>
<style>
span { font-size: 3em; }
.frame { ... }
</style>
How can I merge the styles applied to the component, e.g.
<custom-component [text]="'Some text'">
<style>custom-component { font-weight: bold; }</style>
so that the final output "Some text" is both bold and 3em sized?
Even better is there a way to get the computed styles for the host element, so that, for example, I could apply the background-color
of the host to the border-color
of some element in my template?
styleUrl
property. or you want to achieve it through this way only? – Phia