:nth-child(odd) selects alternate elements by their source order, not the resulting order according to the flexbox order. Is there any way to select for resulting order instead?
The jsfiddle illustrates the problem: the source order of the divs is one three two, and I reorder to one two three using flexbox order. I want to make the background of one and three red.
<div style='display: flex' class='container'>
<div style='order: 1'>one</div>
<div style='order: 3'>three</div>
<div style='order: 2'>two</div>
</div>
<style type='text/css'>.container>:nth-child(odd) { background-color: red; }</style>