Some HTML form elements come with additional user interface features, such as the up/down arrows on the number input. However, when printing a page, these buttons are unnecessary since they cannot be interacted with in print form.
Dealing with text boxes is straightforward:
@media print {
input {
border: none;
border-bottom: 2px solid #000000;
}
}
This style makes text boxes look neat and organized for printing, resembling forms that would traditionally be filled out by hand. Unfortunately, applying similar styling to inputs like number still leaves the unwanted arrow buttons visible:
There are even less valuable printouts, such as range, which provide no useful information when printed on a page:
Is there a way to hide this portion of the element while still displaying the value/text? Perhaps a CSS-only solution exists instead of resorting to swapping out type attributes with JavaScript or using separate elements to hold values for printing purposes.