I have a grid of images that can contain up to 10 images per row. I want to apply unique dimensions for all images based on how many are contained within a row.
How can I determine the number of images per row with a CSS selector?
<div>
<img src="http://lorempixel.com/50/50" />
</div>
<div>
<img src="http://lorempixel.com/50/50" />
<img src="http://lorempixel.com/50/50" />
</div>
<div>
<img src="http://lorempixel.com/50/50" />
<img src="http://lorempixel.com/50/50" />
<img src="http://lorempixel.com/50/50" />
</div>
... etc