Centre text in case where the distance between baselines is larger th…#9211
Centre text in case where the distance between baselines is larger th…#9211jacobp100 wants to merge 6 commits intofacebook:masterfrom jacobp100:centre-baseline
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.
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