I have an input text that for functionality reasons, everytime a click is made on a button, I have to add the property disabled with the aid of javascript, such as the following:
<input class="input" value="1" readonly="" name="input-id-1234" disabled="" hidden="true">
This property is causing the text/value on the input to go grey on mobile.
input {
border: none;
text-align: center;
width: 20px;
}
input:disabled {
-webkit-appearance: none !important;
opacity: 2 !important;
color: black !important;
}
input:focus {
outline: none;
}
<div>
<input class="input" value="1" readonly="" name="input-id-1234" disabled="true">
</div>
This was supposed to work but it is not working on mobile.
Any ideas on how to override the browser disabled property color ( grey out) ?