question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot override list margins (ul, ol li)

See original GitHub issue

It seems that there is no way to override list margins.

Padding left is hard coded for ul and ol tags here: https://github.com/archriss/react-native-render-html/blob/master/src/HTMLRenderers.js#L100

And margin bottom is hard coded for li tags here: https://github.com/archriss/react-native-render-html/blob/master/src/HTMLRenderers.js#L93

Am I correct? Is there any workaround for this? I think it should be possible to override those values somehow.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

12reactions
donni106commented, Aug 9, 2018

The marginBottom: 10 for list items is in line 101 now: https://github.com/archriss/react-native-render-html/blob/master/src/HTMLRenderers.js#L101

Will there be a prop in some future version, or do we need to create a custom renderer to change the margin?

2reactions
jsamrcommented, Jan 27, 2021

@systemride You should be able to set margins for lists in the foundry pre-release, see #430 for instructions on how to try it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot override list margins (ul, ol li) #68 - GitHub
It seems that there is no way to override list margins. Padding left is hard coded for ul and ol tags here: ...
Read more >
In CSS, when I have lists within lists, I can't override the parent ...
I want to make the child list have the classic style "list-style-type: disc", but the browser seems to ignore that, so that I...
Read more >
CSS override of Ordered List Block not reading starting values
I'm using the below code on my website to display the List Items the way I want; it works and looks great. The...
Read more >
Consistent list indentation - CSS: Cascading Style Sheets | MDN
Let's look at the two approaches for a moment. In Internet Explorer and Opera, the lists are indented by setting a left margin...
Read more >
The Ultimate Guide to Bullet Points in HTML Email - Litmus
<ul> indicates an unordered list, or a bulleted list of items. <ol> indicates an ordered list, or a numbered list of items. <li>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found