In one of my project components, I have some text and a mat-slider that appears conditionally.
When the mat-slider is hidden, the text displays like this: https://i.sstatic.net/JkayH.jpg
And when the slider is visible, the text looks like this: https://i.sstatic.net/JYPgJ.jpg
The code snippet is as follows:
<mat-slider *ngIf="isVisible" [min]="minValue" [max]="maxValue" [step]="stepValue" [thumbLabel]="true" [tickInterval]="1"></mat-slider>
<div style="color: #0089D6; font-size: 13px; font-weight: 500;">This is a sample text.</div>
Despite no CSS override affecting the color code, it changes unexpectedly. Can someone explain why this is happening?