Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom form control for <input type="number"> #17923

Closed
bhutaninitin opened this issue Oct 14, 2015 · 7 comments
Closed

Add custom form control for <input type="number"> #17923

bhutaninitin opened this issue Oct 14, 2015 · 7 comments

Comments

@bhutaninitin
Copy link

No description provided.

@cvrebert
Copy link
Collaborator

I'm pretty sure it's not styleable in any significant way other than treating it like a text input.
E.g. The increment and decrement buttons aren't styleable in most browsers, other than making them display: none, and adding replacement buttons requires adding actual <button> elements, and at that point it's basically a custom form control, which is indeed something you can ask for, but it's more than merely "adding CSS styles".

@bhutaninitin bhutaninitin changed the title Add css styles for input type="number" Add custom form control for <input type="number" Oct 14, 2015
@TroySK
Copy link

TroySK commented Oct 14, 2015

How about making them right aligned by default?

@bhutaninitin
Copy link
Author

You are right, Chris. There aren't much styleable with CSS and a custom form control is a more appropriate request. How about a segmented button with input type=number and button elements controlling spin up and spin down for the number?

@cvrebert cvrebert changed the title Add custom form control for <input type="number" Add custom form control for <input type="number"> Oct 14, 2015
@cvrebert
Copy link
Collaborator

@TroySK That sounds fairly reasonable and would be really easy to implement. I encourage you to open a separate issue for your suggestion so that we don't lose track of it.

@TroySK
Copy link

TroySK commented Oct 14, 2015

@cvrebert Opened #17925. Please add appropriate labels.

@mdo
Copy link
Member

mdo commented Dec 8, 2015

Closing on this since I punted on the other PR as well.

@mdo mdo closed this as completed Dec 8, 2015
@bhutaninitin
Copy link
Author

Ahh! I am going to missing <input type=number> form controls. They are useful in scientific projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants