You’re referring to Tailwind CSS utility classes and a selector pattern. Here’s what each part does:
- list-inside: Positions list markers (bullets/numbers) inside the content box so markers sit within the same padding as list items.
- list-disc: Uses a solid disc as the list marker (for unordered lists).
- whitespace-normal: Collapses whitespace and wraps text normally (default white-space behavior).
- [li&]:pl-6: A special Tailwind arbitrary variant that targets child li elements with the parent selector inserted at the ampersand position. Specifically, it applies padding-left: 1.5rem (pl-6) to any li that matches the selector pattern where the li is the element represented by the variant. Usage notes:
- &]:pl-6” data-streamdown=“unordered-list”>
- This variant is used in a parent element’s class list to style child li elements without extra markup.
- Example effect: when placed on a parent, it results in CSS like ”.parent li { padding-left: 1.5rem }” (exact output depends on how the arbitrary variant is written).
- Ensure your Tailwind config allows arbitrary variants (Tailwind v3+ supports them).
Concise example (conceptual):
- Parent element classes: “list-inside list-disc whitespace-normal [li&]:pl-6”
Leave a Reply