Change placeholder color

Reiner Zufall, modified 5 Years ago. New Member Posts: 22 Join Date: 7/6/20 Recent Posts
Hello
i have a requirement to change the placeholder color inside a aui:input field.
i tried by using the cssClass attribute, global setting in look and feel configuration and changed the color for the whole website.
Still the changes will not be adopt by the placeholder attribute i make in scss or with style-tag
i there a way to change the color of the placeholder font?
Best regards Reiner
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
I'd start with your browser's developer tools, to see where the color comes from and for interactive tries to override it
thumbnail
Fredi B, modified 5 Years ago. Junior Member Posts: 69 Join Date: 4/1/20 Recent Posts
Your problem seems to me to be not AUI specific.
Just use:

    .form-control::placeholder { color: red;    }
    .form-control:-ms-input-placeholder {  color: red;    }
    .form-control::-ms-input-placeholder {  color: red;    }
(Chrome/FF/Safari, IE, Edge)

Cheers,
Fredi
Reiner Zufall, modified 5 Years ago. New Member Posts: 22 Join Date: 7/6/20 Recent Posts
Thank you so much, this works for me
I tried something similar, but without these .formal-control