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

[datetime] Increase gap between month selection text and caret #2357

Merged
merged 5 commits into from
Apr 5, 2018

Conversation

reiv
Copy link
Contributor

@reiv reiv commented Apr 4, 2018

Changes proposed in this pull request:

This PR adds font-family: inherit rules to the <select> and <input> elements used in the components of this package. Previously, these were set to the browser defaults (sans-serif); now, they should use the correct font stack. Split off into #2362.

In particular, this fixes an issue where the caret of the month selector was overlapping the text, like this:

datepicker-font

(That's because the measureTextWidth function was producing measurements that incorrectly assumed the body font stack.)

This PR also adds 5px of extra space between the text and caret -- it looked off with no gap at all.

By the way, I think that the TimePicker should perhaps be displayed in a monospace font (an additional visual cue that this input field accepts time values), but that might be too opinionated so I left it at inherit for now.

@reiv
Copy link
Contributor Author

reiv commented Apr 4, 2018

Actually use font-family: inherit

Preview: documentation | landing | table

@giladgray
Copy link
Contributor

@reiv i think the right thing to do here is to upgrade to normalize.css v8.0 which includes this exact fix: https://github.com/necolas/normalize.css/blob/master/CHANGELOG.md#800-february-2-2018

Form inputs inherit font-family.

@reiv
Copy link
Contributor Author

reiv commented Apr 4, 2018

@giladgray Neat! There's four other instances of font-family: inherit in the core package CSS that would become unnecessary as well. Can I change this PR/open a new one to update normalize or are there any stoppers for 8.0?

@giladgray
Copy link
Contributor

@reiv go for it!

@reiv
Copy link
Contributor Author

reiv commented Apr 4, 2018

Revert font-family CSS rule changes

Preview: documentation | landing | table

@reiv reiv changed the title [datetime] Fix select and input fonts [datetime] Increase gap between month selection text and caret Apr 4, 2018
@giladgray giladgray merged commit f6d1104 into palantir:develop Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants