How to change the color of the text of a placeholder
-
Hello, my question is already in the title.
I try but without success to change the color of my placeholders.
I show you the html code for clarity. Thank you
-
You can use:
class_name::placeholder { color: #000000 }
My personal recomandation use as much path you can instead of the class name just to be sure your css is not overiten by other from the framework or any other third party. -
I placed this in my app.styl
$desired-color = purple
.q-if
.q-input-target-placeholder
color $desired-color !important
.q-input-target
&::-webkit-input-placeholder /* Chrome/Opera/Safari */
color $desired-color !important
&::-moz-placeholder
color $desired-color !important
&:-ms-input-placeholder
color $desired-color !importantMay it helps
-
.my_class input::placeholder { }
And for Microsof Edge and Internet Explorer
.my_class input::-ms-input-placeholder { }