I'm working with CSS' display:contents paired with element>elementselector.
As for the definition, the display:contents property:
Makes the container disappear, making the child elements children of the element the next level up in the DOM
So I have this example code:
.wrapper {
background-color: red;
}
.hidden {
display: contents;
}
.wrapper > .child {
background-color: yellow;
}Run Code Online (Sandbox Code Playgroud)
<div class='wrapper'>
<div class='hidden'>
<div class='child'>I'm a child</div>
<div class='child'>I'm a child</div>
</div>
<div class='child'>I'm a child</div>
<div class='child'>I'm a child</div> …Run Code Online (Sandbox Code Playgroud)