py-1 [&>p]:inline

You’re referring to a Tailwind CSS utility-like shorthand: py-1 [&>p]:inline.

Explanation:

  • py-1 sets vertical padding (padding-top and padding-bottom) to 0.25rem (Tailwind’s spacing scale 1).
  • [&>p]:inline a Tailwind JIT arbitrary selector that applies the inline display to direct child

    elements (the selector is & > p).

Behavior together:

  • The element gets small vertical padding.
  • Any direct child

    becomes display: inline; (so its block behavior is removed; margins, line breaks, and width behave like inline content).

Notes:

  • Requires Tailwind JIT / arbitrary variants support.
  • The exact spacing value depends on your Tailwind config if customized.
  • [&>p]:inline → for nested, use [&_:where(p)]:inline or a different selector.

Comments

Leave a Reply

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