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

NumberInput has monospace font as opposed to sans in TextInput #8321

Closed
1 of 2 tasks
kubijo opened this issue Apr 7, 2021 · 4 comments
Closed
1 of 2 tasks

NumberInput has monospace font as opposed to sans in TextInput #8321

kubijo opened this issue Apr 7, 2021 · 4 comments

Comments

@kubijo
Copy link
Contributor

kubijo commented Apr 7, 2021

  • carbon-components
  • carbon-components-react

Detailed description

Is there any particular reason why NumberInput has monospace font while TextInput has a normal one?

I've encountered this because we have our fonts and monospace variant is bolder, so TextInput & NumberInput alongside each other look starkly different

@tw15egan
Copy link
Collaborator

tw15egan commented Apr 7, 2021

cc @carbon-design-system/design

@kubijo
Copy link
Contributor Author

kubijo commented Apr 7, 2021

Also while we're at it ... there seems to be a inconsistency in props naming ... TextInput uses prop labelText for label while NumberInput has label

@tw15egan
Copy link
Collaborator

tw15egan commented Apr 7, 2021

Agreed, the prop inconsistency is a known issue, see

#8150
#7538 (comment)

@aagonzales
Copy link
Member

Yes number input has mono space to account for non-numerical character that may be in a number input like increment names. This way the spacing of the characters is equal for alignment purposes.

The numerals themselves are actually the same glyphs in mono and sans (besides 0) so there isn't much of a visual difference unless you're using non-numerals.

Other components that use mono in the field include date picker for similar reasons.

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

3 participants