display: contents

When adding display: contents to a parent element:

The MDN docs state that the parent element is “replaced by [its] pseudo-box and their child boxes.

.parent {
	border: 5px solid mediumpurple;
	color: cyan;
	background-color: rgba(255, 255, 0, 0.25);
}
.parent .child {
	border: 5px dashed red;
}

Normal:

child

With display: contents on the parent:

child

A particularly handy use case that I encountered for this property is as follows:

The image horizontally scrolls if on mobile

By default / on the desktop:

On a mobile viewport:

*As of writing, elements with this display value will be removed from the “accessibility tree”, meaning that the element itself is not visible to screen readers. This does not comply with the CSSWG specification.

reference