Add styles only if first/last child?

Wondering if it is possible to add styles for CSS selectors like :first-child or :last-child ? (Using Plasmic UI, so without resorting to custom embed CSS.)

Why I’m asking: I find it non-trivial sometimes to add a “divider” border between elements. Let’s say I want a border between them, but not before the first element, nor after the last element.

Currently I have to:

  • use background and gap, or
  • put a divider explicitly, using repeat logic like “render only if currentIndex > 0”, or using props such as isFirst / isLast

Not at the moment unfortunately! :pensive: