"Spinner size" is an indefinite concept, but the <input type=number> element seems to obey at least the width , height and font property settings. Example:
<input type=number value=42 min=0 max=99 style="font: 24pt Courier; width: 3ch; height: 3em">
Whether such settings are useful and whether they should work is another problem. It can be argued that the implementation of such elements is expected to be browser-specific, enjoyable, usable widgets, suitable for viewing conditions, and not what authors should do with. But in practice, the widget is heavily dependent on CSS settings, and in practice, this can be good. because the default input field is too large. (We could expect browsers to set it according to the min and max values, but that just isn't happening at the moment.) The risk is that by setting the width, you might run into an implementation. The code above assumes that the up and down arrows will have a width of no more than one character, but this assumption may not be correct.
Jukka K. Korpela
source share