Line Height Not Respected in iOS
See original GitHub issueHello! First off, thanks for the library! It has been very useful thus far. One thing I seem to be struggling with is that while I am trying to style a paragraph’s lineHeight
, iOS seems to ignore this property while Android is respecting it.
...
<MarkdownView style={styles.markdownContainer} styles={styles.markdown}>
{markdown}
</MarkdownView>
...
const styles = {
...
markdown: {
paragraph: {
lineHeight: 28, // Respected in Android, not iOS
}
}
...
}
Any thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Line Spacing is Crowded in iPhone - Litmus
I'd try setting the line-height with no unit or a relative unit (like em ). So, for example, if you have a font-size:16px;...
Read more >css line-height not working on mobile device - Stack Overflow
I have tried to align some items vertical middle using line-height in my hyprid app (ionic). how ...
Read more >UIWebView: issues with line-height in iOS11b9
Hello Apple, We have noticed a problem in our production app, related to zooming of text in a UIWebView, in iOS11b9. As a...
Read more >Line height not working. - Forums - CSS-Tricks
I am trying to add line-height to my blog post from firebug but the changes are not shown.
Read more >How to Fix Line Height in Outlook.com - Email on Acid
The ESP I use does not allow to add CSS in the <head> or <body> tag. Is there way to fix this with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Benjamin-Dobell I’ve got an expo snack reproducing the issue here https://snack.expo.io/@ragnar/https:-github.com-benjamin-dobell-react-native-markdown-view-issues-25
Try running it on Android and iOS to see the difference.
The issue seems to be that
lineHeight
is not propagated from a parentText
to childText
components. I’ve inspected the output of a paragraph render withreact-devtools
, which is:I tried removing this line locally, which seems to fix the issue. But I’m not sure what side effects will come from removing it.
@Ragnar-H is right. Instead of removing the line he mentioned it is enough to pass
rules={{text:{render:undefined}}}
in theMarkdownView
props.