You’re referencing Tailwind CSS utility classes and a variant-like selector. Here’s what each part does and how they work together:
- list-inside: Places list marker (bullet/number) inside the content flow instead of hanging outside.
- 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 — This is an arbitrary selector variant matching sibling/descendant structure using Tailwind’s JIT arbitrary variants. It applies padding-left: 1.5rem (pl-6) to the element when the selector ”[li&]” matches. The selector [li&] means “an element where the current element (&) is matched inside an li attribute selector” — in practice it’s used to target elements when the li element wraps or prefixes the current element via a modifier-like class. Example usage patterns vary, but a common intent is to increase left padding on elements that are inside an li to line up with list markers.
Practical example (JIT arbitrary variant):
- To add left padding to a direct child when it’s inside an li element, you might write:
- Notes
- &]:pl-6” data-streamdown=“unordered-list”>
- Arbitrary variants require Tailwind JIT and proper escaping in HTML/CSS contexts; some frameworks need different escaping (e.g., React className strings).
- If your goal is to align wrapped lines with the text rather than the bullet, use list-inside plus appropriate padding/margin on the list item.
- Notes
Leave a Reply