What it selects
- py-1 is a class selector matching elements with class=“py-1”.
- [&>p]:inline is a Tailwind-like arbitrary selector syntax (used by tools like Tailwind CSS JIT or similar utility frameworks) that generates a nested CSS rule targeting direct child
elements and applies theinlineutility to them.
Together the generated rule means: for any element with class py-1, its direct child p elements should be displayed inline.
Equivalent plain CSS
css
.py-1 > p {display: inline;}
Notes
- This exact
[&>p]:inlinesyntax is not standard CSS; it is a utility-framework shorthand that expands to the above selector+declaration. - The
&represents the parent selector (the element with the class), and>means direct child. If you wanted to target all descendant p elements you’d use[& p]:inlinein the same shorthand.
Leave a Reply