I was trying to color ion-label (floating element) in ionic 4 but needed to use !important in the property
<ion-row class="ion-margin-vertical ion-padding-horizontal">
<ion-col size="12" class="ion-margin-bottom">
<ion-item>
<ion-label position="floating">Contact Number</ion-label>
<ion-input type="number" value="333"></ion-input>
</ion-item>
</ion-col>
<ion-row>
I tried using custom style in global.scss
ion-label {
--color: var(--ion-color-step-400) !important;
}
unable to do the same without important but was not working, but when I used !important it works. Is it the correct approach? Need help.