How does one use the list-disc class to style bullets, using Tailwindscss?
My package.json includes:
"@tailwindcss/aspect-ratio": "^0.2.0",
"@tailwindcss/forms": "^0.3.2",
"@tailwindcss/line-clamp": "^0.2.0",
"@tailwindcss/typography": "^0.4.0",
"tailwindcss": "^2.1.1",
"tailwindcss-stimulus-components": "^2.1.2",
I try using <ul class="list-disc">
both without and with the /typography plugin's class="prose"
and they look different but neither is as expected, and Firefox and Chrome looks the same:
Without a container (List 1) with class="prose"
the bullets are completely unstyled, no indent, and show browsers default bullet point.
With the class="prose"
container (List 2) it does create a hanging indent, and a lighter bullet point but also has the browser default bullet point (so double bullet symbol):
Here's the HTML of creating that view:
<div class="container mx-auto m-4">
<h3>List 1</h3>
<div>
<ul class="list-disc">
<li>Bullet one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence.</li>
<li>Shorter second sentence. </li>
</ul>
</div>
<h3>List 2</h3>
<div class="prose">
<ul class="list-disc">
<li>Bullet one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence, one long sentence.</li>
<li>Shorter second sentence. </li>
</ul>
</div>
</div>
I'm fairly new to Tailwindcss, so I might have missed some parent element that "resets" the default bullets?
POSSIBLE CULPRIT: The culprit is the m-4
class in the container div, adding margin exposes a browser-default bullet that is dangling off-screen, unless there is any padding or margin in which case it is no longer off-screen.