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

Proposal : unit property for input type="number" #5055

Open
lespacedunmatin opened this issue Oct 29, 2019 · 3 comments
Open

Proposal : unit property for input type="number" #5055

lespacedunmatin opened this issue Oct 29, 2019 · 3 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: forms

Comments

@lespacedunmatin
Copy link

(Import of Issue 1417 in W3C/HTML)

I’d like to have to possibility to set a unit property on input type="number".

Browsers would be expected to display the specified unit close to the number (perhaps there would need a specific CSS option to specify if the unit should be before or after the figure, like for $10 vs 10€).

Assistive technologies would be expected to expose the unit to the user, and copy/paste would be expected to copy the number and its unit.

@annevk annevk added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Oct 29, 2019
@Yay295
Copy link
Contributor

Yay295 commented Oct 29, 2019

Instead of only having this available for numeric inputs, it seems it could be more generally applied to all text-like inputs as prefix and postfix.

Or perhaps an even more general display-format attribute that accepts something like a JS template string.

@lespacedunmatin

This comment has been minimized.

@domenic
Copy link
Member

domenic commented Oct 30, 2019

Heya, please see https://whatwg.org/faq#adding-new-features. In particular, start with step 1 and 2. What is the specific use case you are trying to accomplish which cannot be done today? This might lead you to questions like "how is this different from ::after", etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: forms
Development

No branches or pull requests

4 participants