py-1 [&>p]:inline

“py-1 [&>p]:inline” is a utility-style class expression (commonly used with Tailwind CSS or similar utility frameworks) that applies two separate styles:

  • py-1 sets vertical padding (padding-top and padding-bottom) to a small value (usually 0.25rem in Tailwind).
  • [&>p]:inline uses the arbitrary selector feature to target direct child

    elements and apply display: inline to them.

Expanded meaning in CSS terms:

  • The container gets padding-top: 0.25rem; padding-bottom: 0.25rem;
  • Any direct child p elements (container > p) get display: inline;

Equivalent plain CSS (assuming Tailwind’s spacing scale where 1 = 0.25rem):
.container {
padding-top: 0.25rem;
padding-bottom: 0.25rem;
}
.container > p {
display: inline;
}

Notes:

  • [&>p]:inline requires a build setup that supports arbitrary selectors (Tailwind v3+).
  • The selector targets only immediate child

    elements, not nested p elements.

  • If you want all descendant p elements use [& p]:inline instead.

Your email address will not be published. Required fields are marked *