title: CSS flex: last and first item in a row selector
body: <p>I'm having a problem trying to select the last element of the first row and the first element of the last row of a flex container.</p>
  
  <p>My flex container is <code>flex-wrap: wrap;</code> and all my elements are <code>flex: auto;</code> and they have different sizes, and by flex auto I let the elements fit like justify on my container, and my corner elements have their respective corner rounded.</p>
  
  <p>But, the problem is, I'm hiding and showing the elements with events (like on click), and I need to set the corners elements rounded every time it changes, if it has a grid container I could pick by <code>nth-child</code> because it never change the number of columns. But in the flex have a different number of elements per row.</p>
  
  <p>I came up with a Jquery solution (link down bellow), but i think it's to ogle and big, may have a smarter way or a simple selector I cant use.</p>
  
  <p>Please help me to came up with a better code, so not just me cant make a good use of it.</p>
  
  <p><a href="http://jsfiddle.net/aj1vk0rv/" rel="noreferrer">http://jsfiddle.net/aj1vk0rv/</a></p>
  
  <p>edit:
  Just improved a bit the code
  <a href="http://jsfiddle.net/aj1vk0rv/1/" rel="noreferrer">http://jsfiddle.net/aj1vk0rv/1/</a></p>