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

lineHeight style on outer Text is not applied to nested Text on iOS #19051

Closed
3 tasks done
alexisbronchart opened this issue Apr 27, 2018 · 5 comments
Closed
3 tasks done
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@alexisbronchart
Copy link

alexisbronchart commented Apr 27, 2018

Setting the lineHeight style like in the following code has no effect on iOS.

render() {
    return (
      <View>
        <Text style={{ lineHeight: 24 }}>
          <Text>
            an error occured an error occured an error occured an error occured
            an error occured an error occured an error occured an error occured
            an error occured an error occured an error occured an error occured
            an error occured an error occured an error occured an error occured
            an error occured an error occured an error occured an error occured
            an error occured an error occured
          </Text>
        </Text>
      </View>
    )
  }

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 9.5.0
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.3 => 0.55.3

Steps to Reproduce

Render a simple view with the code above (on iOS).

Expected Behavior

I would expect the lines to be more spaced (like it does when I apply the style on the inner Text).

Actual Behavior

The text renders the same as if I wouldn't set any style.

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Apr 27, 2018
@aparedes
Copy link
Contributor

This is fixed by #18340 but it has not landed in a release. Hopefully it will be added in 0.56.0

@stale
Copy link

stale bot commented Jul 29, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 29, 2018
@aparedes
Copy link
Contributor

It is fixed in 0.56.0

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 29, 2018
@stale
Copy link

stale bot commented Oct 27, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 27, 2018
@stale
Copy link

stale bot commented Nov 3, 2018

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Nov 3, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Nov 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants