-
Notifications
You must be signed in to change notification settings - Fork 25k
Centre text in case where the distance between baselines is larger th… #9211
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
Conversation
…an the font size (per CSS spec)
|
By analyzing the blame information on this pull request, we identified @rigdern and @emilsjolander to be potential reviewers. |
Libraries/Text/RCTShadowText.m
Outdated
|
|
||
| if (lineHeight > fontSize) { | ||
| [attributedString addAttribute:NSBaselineOffsetAttributeName | ||
| value:@(lineHeight/2 - fontSize/2) |
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.
Style: Spaces around operators (/)
|
I'm not super familiar with typography and am unsure if |
…e to get the actual space the font takes up
|
@jacobp100 updated the pull request. |
|
You’re correct in that. I’ve updated it to use the font |
|
Looks like the Obj-C tests are failing (UIExplorerSnapshotTests in https://travis-ci.org/facebook/react-native/jobs/149979798) -- some of the tests capture screenshots and do a before-and-after comparison, so you probably need to re-record them. See https://facebook.github.io/react-native/releases/0.31/docs/testing.html#snapshot-tests-ios for more about the screenshot tests. |
|
@jacobp100 updated the pull request. |
|
@jacobp100 updated the pull request. |
1 similar comment
|
@jacobp100 updated the pull request. |
|
@jacobp100 updated the pull request. |
|
@facebook-github-bot shipit |
|
Thanks for importing.If you are an FB employee go to Phabricator to review internal test results. |
Summary: …an the font size (per CSS spec) Extending upon work facebook#7603 Closes facebook#8851   Closes facebook#9211 Differential Revision: D3706347 fbshipit-source-id: 0adfff8e8418b02f9b5d6671f5c89669e41abec3
Summary: …an the font size (per CSS spec) Extending upon work facebook/react-native#7603 Closes facebook/react-native#8851   Closes facebook/react-native#9211 Differential Revision: D3706347 fbshipit-source-id: 0adfff8e8418b02f9b5d6671f5c89669e41abec3
…an the font size (per CSS spec)
Extending upon work #7603
Closes #8851