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.

How to style list bullets in v6?

See original GitHub issue

Oath

I swear that I have completed these tasks before submitting:

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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
jsamrcommented, Aug 18, 2021

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 />?

@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.

0reactions
Slapboxcommented, Aug 17, 2021

@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?

Read more comments on GitHub >

github_iconTop 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 >

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