-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
26d0d80
to
e2f494c
Compare
There was a problem hiding this 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" |
There was a problem hiding this comment.
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 _?
There was a problem hiding this comment.
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.
@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. |
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