Exploring the new possibilities of CSS 4 with custom properties, my goal is to utilize them in Angular.
Traditionally, custom properties are used in the following manner:
<div style="--custom:red;">
<div style="background-color: var(--custom);">
hello
</div>
</div>
However, when attempting to bind custom properties using Angular's mechanism, the desired red rectangle is not achieved:
<div [style.--custom]="'red'">
<div style="background-color: var(--custom);">
hello
</div>
</div>
So the question arises - how can custom properties be successfully bound in Angular?