How to style list bullets in v6?
See original GitHub issueOath
I swear that I have completed these tasks before submitting:
- I have read the contribution guidelines here: https://git.io/JJ0Pg
- I have read the documentation here: https://meliorence.github.io/react-native-render-html/
- I have confirmed that this bug has not been reported yet
Decision table
- My issue does not look like “The HTML attribute ‘xxx’ is ignored” (unless we claim support for it),
- My issue does not look like “The HTML element
<yyy>
is not rendered”
Bug Report
Before updating to v6 I was using this setup for styling bullet, but now from docs I don’t understand how to achieve the same
listsPrefixesRenderers={{
ul: () => {
return <View style={{
marginRight: 10,
width: 10,
height: 10,
marginTop: 12,
borderRadius: 12,
backgroundColor: 'red',
}} />
},
}}
Can anyone help?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
pages v6.1.1 bullets - Apple Community
Start here. Create your list and select the paragraphs where you want bullets. Format Panel > Text > Bullets & Lists > Text...
Read more >Styling lists - Learn web development | MDN
list-style -type : Sets the type of bullets to use for the list, for example, square or circle bullets for an unordered list,...
Read more >How To Change Bullet Color of a List - W3Schools
Step 2) Add CSS: By default, it is not possible to change the bullet color of a list item. However, you can do...
Read more >CSS: colored bullets and list numbers - W3C
You can make an image and use that: 'list-style: url(mybullet.png)'. That gives you full control over the color and shape of the bullet....
Read more >Lists – What Else Can I Do - mPDF
The automatic indentation only works for bullets or numbered lists, and is ignored if list-style-position: inside is set, or images are used ...
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
@Slapbox You already can, see https://meliorence.github.io/react-native-render-html/docs/content/lists#defining-and-customizing-markers-pseudo-elements You’ll need to create a cyclic counter renderer with one character.
@jsamr thanks for your hard work on this project!
Is there a plan for a way to pass a custom character so we can use a dash (- or —) as our list marker for both
<ul />
and<ol />
?We’ve ported a lot of our changes over to 6.x today, but my heart sank a bit when I saw there’s nothing we can do to replicate, or even emulate, the styles we were using in 5.x. I love the changes overall; a lot of things are just way smoother, but is support for custom text marker characters planned, I hope?