there!
So, I'm trying to do the following: I have a small component in AngularJs that will render a tag-like unit. I am defining general styles inside it, like colors and borders. They are supposed to be the default values. However, I want to outer components to be able to override it by changing the value of the CSS variable. Here's the example:
tagLike.html
.tag-like-container {
--tag-like-color: red;
color: var(--tag-like-color);
}
<div class="tag-like-container">
my tag
</div>
And, then, the outer component will call it
outerComponent
.outer-container {
--tag-like-color: blue;
}
<div class="outer-container">
<tag-like></tag-like>
</div>
However, the final value of --tag-like-color is red, but I want it to be blue. Any ideas on how to approach this?
Thanks!