Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Emotion][Theming] Add new consumer-configurable
font.defaultUnits
token #7133[Emotion][Theming] Add new consumer-configurable
font.defaultUnits
token #7133Changes from 5 commits
22e8e98
79c59a6
6e93f44
648e3b2
56125c7
c94844c
7d3c34a
52e5f90
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
[naming things is hard] now that I realize
line-height
is using this as well asfont-size
, I'm wondering if this var name still makes sense. Maybe justor
orrrr
??
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.
I lean toward
defaultUnits
myself. When I see the objectfont.defaultUnits
I immediately think "pixesl, ems, or rems."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.
I'm leaning towards
defaultUnits
as well! Going to make that change here 🎉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.
Token rename: c94844c
Far more opinionated rename of all
measurement
-adjacent variable names tounit
instead: 7d3c34aI'd be curious to hear what you think about the 2nd commit - for me personally, as a dev with over a decade of CSS experience,
measurement
means very little to me, whereasunit
has a very specific connotation within CSS font sizes and I feel it more accurately describes the enum. That being said, I'm being pretty opinionated with that change, so if you're not a fan of it or are worried about downstream implications, I'm definitely open to reverting it!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.
I'm looking at the changes now and I think you're onto something with this new naming convention.
To my thinking
16
is a measurementpx
are the unitsUnits mean a lot more to me too. The functions are clearer with the new names. I trust your call to make this change and support it 100%.
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.
Great call on the distinction. It sounds like you're good with moving ahead with the full rename - if so, I'll merge the PR once you've approved. Thanks again Trevor!