margin-trim
An experimental property that 'trims' the margins of child elements when they hit the edges of their container. It's a cleaner way to handle things like the last item's margin-bottom.
It is documented as part of the CSS Box Model specification. This is an experimental technology. The syntax and behavior are still subject to change.
Syntax
/* Usage Example */
.container {
/* Automatically removes bottom margin from the last child */
margin-trim: block-end;
}
/* Syntax */
margin-trim: none;
margin-trim: in-flow;
margin-trim: all;
/* Global values */
margin-trim: inherit;
margin-trim: initial;
margin-trim: revert;
margin-trim: revert-layer;
margin-trim: unset;
margin-trim Browser support
This feature is not Baseline because it does not work in some of the most widely-used browsers.