Can't apply fontSize to headings
See original GitHub issueHello!
I have simple React element with the following render method:
render () {
const bodyStyles = { fontSize: 12 }
const titleStyles = { fontSize: 18 }
return (
<ScrollView style={styles.container}>
<KeyboardAvoidingView behavior='position'>
{
this.props.items.map((item, index) => {
return <View key={index} style={styles.item}>
<Text style={styles.itemIndex}>{index + 1}</Text>
<Markdown styles={{text: bodyStyles, heading: titleStyles, heading1: titleStyles}}>
# Heading
Ordinary text
</Markdown>
</View>
})
}
</KeyboardAvoidingView>
</ScrollView>
)
}
In this case, Heading
has incorrect fontSize (12 instead of 18). I’ve tried without text
style and with heading
only, but no luck.
Used packages:
"react": "16.0.0-alpha.12",
"react-native": "0.47.1",
"react-native-simple-markdown": "^1.0.60-rc.3"
@CharlesMangwa , is it related to #37 ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Font size change doesn't work on Headings H1, H1…
Going to Customize / Typography changing the font size of the 'Body' does work! But changing the font size of any 'Heading' (H1,...
Read more >Can't change font for headings (CSS, Bootstrap)
You should put it as: h3, p { font-family: "Times New Roman", serif; }. All the tags and classes should be giving in...
Read more >Topic: can't change font size in page titles - WordPress.com
Hi, I am having trouble changing font size for static pages (about, contact, etc) in the “lovecraft” theme. Under the Fonts menu, ...
Read more >Resetting Default Heading and Body Fonts in Word
Here's how to change MicroSoft Word fonts default heading and body ... Select +Body and the size text you want, then click Set...
Read more >Change the font size - Microsoft Support
Click the Manage Styles button (third from left at the bottom). ... Click the Set Defaults tab and pick the size you want...
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
Might be related: I’ve noticed
text
styles seem to override other styles, like those set forlink
. (In my case I can’t set a custom color tolink
iftext
also has one.) Hope this helps to narrow it down. I probably don’t have the time and energy to look into it myself, though. 😕@CharlesMangwa, as @vpelkonen mentioned, the problem here is that “text” style overwrite the other styling.