You’re referring to a set of CSS classes/values that look like Tailwind-style utilities plus a CSS selector pattern. Here’s a concise explanation and example of what each part likely means and how to implement it.
Meaning
- list-inside: CSS list-style-position: inside; (markers inside the content flow).
- list-decimal: CSS list-style-type: decimal; (numbered list).
- whitespace-normal: CSS white-space: normal; (wrap text normally).
- [li&]:pl-6: Tailwind-style arbitrary variant targeting li elements (selector uses a placeholder ”&” for the parent) applying padding-left: 1.5rem (pl-6 in Tailwind = 1.5rem) to those li. In plain CSS this means adding left padding to li elements selected by that variant
Plain HTML/CSS equivalent
html
<ul class=“custom-list”><li>First item</li> <li>Second item with a long line that wraps normally.</li></ul>
<style>.custom-list { list-style-position: inside; /* list-inside / list-style-type: decimal; / list-decimal / white-space: normal; / whitespace-normal /}.custom-list li { padding-left: 1.5rem; / [li&]:pl-6 equivalent */}</style>
Tailwind (using arbitrary selector variant)
If you use Tailwind CSS with JIT and the arbitrary selector plugin/variant syntax, the class might be written in HTML like:
html
<ul class=“list-inside list-decimal whitespace-normal [li&]:pl-6”> <li>Item one</li> <li>Item two</li></ul>
This applies pl-6 to each li via the variant that transforms [li&] into a selector matching the li children.
Notes
- &]:pl-6” data-streamdown=“unordered-list”>
- Ensure your Tailwind config supports arbitrary variants (JIT mode) and the syntax your setup requires.
Leave a Reply