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

Use theme font size in a meaningful way #885

Merged
merged 1 commit into from
Dec 6, 2017

Conversation

majapw
Copy link
Collaborator

@majapw majapw commented Dec 6, 2017

Previously we set the font size in the theme and then did nothing about it. This worked in the storybook and anywhere else where the page font size was 14px, but if you changed that value, everything in the calendar would inherit from it which could be weird. This fixes the font size to a default value of 14px. If you want something different, you should register a theme value of inherit, or override appropriately.

to: @ljharb @erin-doyle @airbnb/webinfra

@majapw majapw added the semver-patch: fixes/refactors/etc Anything that's not major or minor. label Dec 6, 2017
@majapw majapw force-pushed the maja-force-font-size-to-read-from-theme branch from 26d0d80 to e2f494c Compare December 6, 2017 19:43
@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.707% when pulling e2f494c on maja-force-font-size-to-read-from-theme into e92deb3 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 86.707% when pulling e2f494c on maja-force-font-size-to-read-from-theme into e92deb3 on master.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; this seems like a breaking change tho, if we're being conservative

>
<div
{...css(styles.DayPickerKeyboardShortcuts_title)}
id="DayPickerKeyboardShortcuts__title"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change the BEM __ to a single _?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the pattern I've been using throughout and this was a place I'd missed it. If you look at the rest of the app, I've been using __ for modifiers and _ for elements. The title, in this case, is an element, not a modifier.

@majapw
Copy link
Collaborator Author

majapw commented Dec 6, 2017

@ljharb I would argue that this is a patch because inherited styles from anything other than 14px look super weird (and kind of broken) without this change.

@majapw majapw merged commit be5e24f into master Dec 6, 2017
@majapw majapw deleted the maja-force-font-size-to-read-from-theme branch December 6, 2017 21:45
@majapw majapw restored the maja-force-font-size-to-read-from-theme branch February 2, 2018 23:40
@erin-doyle erin-doyle deleted the maja-force-font-size-to-read-from-theme branch March 26, 2020 17:42
@ljharb ljharb restored the maja-force-font-size-to-read-from-theme branch March 26, 2020 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch: fixes/refactors/etc Anything that's not major or minor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants