How can we change the default underline color of a ion-text in only a single page in Ionic 4?
Ionic 4.x uses CSS Custom Properties for most of the time.
src/app/pages/test/test.page.scss
:host {
ion-item {
--border-color: white; // default underline color
--highlight-color-invalid: red; // invalid underline color
--highlight-color-valid: green; // valid underline color
}
}
If necessary, please check the other custom properties here.
Try this css
.item-has-focus{
--highlight-background: #e2e2e2;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With