Description
If we nest text element inside text element with different heights eg: lineHeight 20 inside lineHeight 30 output on android will be cropped, the bigger difference the bigger crop is. It looks like parent Text element takes child Text lineHeight.
I have found workaround by wrapping child Text element by View element first to break Text styles inheritance.
React Native version:
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Expected Results
Text should be displayed the same way on Android and on iOS
Snack, code example, screenshot, or link to a repository:
Minimal App to show bug:
import React from 'react';
import { StyleSheet, View, Text } from 'react-native';
const styles = StyleSheet.create({
text1: {
fontSize: 20,
lineHeight: 30,
fontWeight: 'bold',
},
text2: {
fontSize: 10,
lineHeight: 20,
},
container: {
padding: 50,
backgroundColor: 'white',
height: '100%',
},
});
const App = () => {
return (
<View style={styles.container}>
<Text style={styles.text1}>TEXT 1 <Text style={styles.text2}>TEXT 2</Text></Text>
</View>
);
};
export default App;
Screenshot Android:

Screenshot iOS:

Description
If we nest text element inside text element with different heights eg: lineHeight 20 inside lineHeight 30 output on android will be cropped, the bigger difference the bigger crop is. It looks like parent
Textelement takes childTextlineHeight.I have found workaround by wrapping child
Textelement byViewelement first to breakTextstyles inheritance.React Native version:
Expected Results
Text should be displayed the same way on Android and on iOS
Snack, code example, screenshot, or link to a repository:
Minimal App to show bug:
Screenshot Android:
Screenshot iOS: