Add something like :last-item-in-row

Hi!

I have problem in my work with CSS.
I have task: I should detect last element in row in ul list.

The structure looks like:
<ul>
<li>123</li>
<li>123</li>
…
<li>123</li>
</ul>

And `li` have display:inline-block, vertical-align: top

So by window size and content - last elements in row can change.


I regret I have not found something like “nth-last-of-line” or “last-in-row” or “last-in-line”.
There is no such selector and I think it is strange that I can’t do it with CSS, only with JS.

So it would be cool to add smh like this!

Thank you!

Yours sincerely,
Gordey Levchenko,
Frontend developer

Received on Wednesday, 6 July 2016 13:33:08 UTC