Is there a way to hide the new HTML5 spinbox controls shown in Google Chrome & Opera? [duplicate]
Asked Answered
L

1

9

Google Chrome now, and Opera before, shows a "spin box" control beside a input field of type "number". I want to be able to style this, or hide it. Are there ways of controlling this UI element yet?

EG: alt text <-- That little ui element with an up and down arrow. It's not that functional and its adding unnedded elements to a form I've created.

I understand I can just not have the type as "number" but it allows built in prevention of entering anything other than a number, and is semantically correct.

Leastwise answered 20/8, 2010 at 2:54 Comment(1)
See my answer here: #3791435Avebury
D
3

At the moment, the answer is no - as far as I know anyway.

The HTML5 spec generally doesn't want to dictate what the user interface should look like, this also applies to the input type=number feature. I think there is a sort of implicitly expected workflow which goes somewhat like

input from authors/browser vendors/interesting people > spec text in HTML spec > implementations (experimenting with UI) > UI conventions (experimenting with styling) > CSS proposals > CSS spec for how to style the new controls.

Hence, real control over the rendering of the new inputs won't be possible in the near future. Of course, browsers may meanwhile implement experimental vendor-specific CSS extensions..

Darceydarci answered 20/8, 2010 at 15:22 Comment(3)
I thought as much. Cheers for your timeLeastwise
@Darceydarci It's been a while since you posted this answer. Is it anything new here? Thanks :)Feline
Not as far as I know. Actually, if styling this "spinner" doesn't make it into CSS3 (CSS UI module w3.org/TR/css3-ui most likely) I guess we'll have to wait for CSS4.. We may of course see some -o- or -webkit- vendor-specific properties first, but I don't think this will be considered high-pri in the near future :-/Darceydarci

© 2022 - 2024 — McMap. All rights reserved.