How can I change the width value in ::before property dynamically? Want to achieve this:
ts:
fillWidth: number = '50%';
html:
<div class="track">
<div class="step featured-w" [ngStyle]="{'--featured-w': fillWidth}"></div>
</div>
CSS:
.track .step::before {
height: 13px;
position: absolute;
content: "";
width: var(--featured-w); // this is not working, to increase green part
left: 0;
top: 15px;
}
I tried this: Assign variable to CSS