Is there a way to combine selectors effectively?
<input type=number>
<input type=date>
I was able to successfully hide the arrows in a number field with the following code:
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
}
However, I am now trying to add the date field to the same styling but struggling to combine them. I have attempted various combinations without success. It seems like it should be simple, but my attempts haven't worked.
input[type=number][type=date]::-webkit-inner-spin-button,
input[type=number][type=date]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
}
I understand that there are alternative methods such as using IDs, but since I am learning CSS, I would like to figure out how to merge [type=date] and [type=number] into a single line of code. Does anyone have any suggestions?
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
margin: 0;
}
<input type=number>
<input type=date>