You’re referencing a Tailwind CSS utility plus a bracketed variant:
- py-1 — Tailwind utility that sets vertical padding (padding-top and padding-bottom) to 0.25rem (4px) by default.
- [&>p]:inline — Tailwind’s arbitrary selector variant that targets direct child
elements and applies the inline display to them.
Combined usage (e.g., class=“py-1 [&>p]:inline”) means: add 0.25rem vertical padding to the element, and make any direct child
elements display:inline. This is useful when you want block-level paragraphs inside a padded container to render inline (no line breaks) while keeping the container’s vertical spacing.
Leave a Reply