To select the direct children (level 1 children of the flex container):
.flexboxcontainer {
display: flex;
}
.flexboxcontainer>* {
/*Select only 1 level children */
padding: 20px;
border: 2px solid black;
}
<div class="flexboxcontainer">
<h1>Headline</h1>
<p>Some Text</p>
<div>Some more text
<h3>Random stuff</h3>
</div>
<p class="smalltext">Some small text
<span>Additional text</span>
</p>
</div>
To select all children i.e descendants (all level children of the flex container):
.flexboxcontainer {
display: flex;
}
.flexboxcontainer * {
/*Select all level children */
padding: 20px;
border: 2px solid black;
}
<div class="flexboxcontainer">
<h1>Headline</h1>
<p>Some Text</p>
<div>Some more text
<h3>Random stuff</h3>
</div>
<span class="smalltext">Some text
<p>More text</p>
</span>
</div>
.flexboxcontainer > *