I don't know that I really get the point of margin-trim - there are already plenty of other, arguably clearer ways of avoiding padding at the start and end of an element - using flexbox and the gap property, using :not, even the classic + selector works pretty well here.
Is it designed to do more than just that, or is it just about avoiding gaps at the start and end of lines of elements?
margin-trim is basically a simpler alternative to adding a margin-bottom to every child, then removing the margin-bottom from the last child with :last-child { margin-bottom: 0; }
Flex with gap is also an alternative to that, and in my view should be the default thing you reach for. But there are some cases where the child margin approach has benefits, particularly if you're doing certain animations/transitions or if you want each child to essentially override its top or bottom gap.
But can't you do .selector:not(:last-child) ? Or .selector + .selector ? Both of these seem clearer than adding an extra property just to handle this case.
Like, I understand the situation, I've been in that place plenty of times. But I've never felt in want of a solution there.
Is it designed to do more than just that, or is it just about avoiding gaps at the start and end of lines of elements?