i have a horizontal bar made from flexbox
.
If there are 2 or more items, I want each items separated as far as possible, so I set justify-content: space-between
.
But if there is only 1 item, I want the item placed at the end, so I set justify-content: flex-end
.
The items are ordered from left to right. So setting flex-direction: row-reverse
wouldn't work.
How I combine the first, second & third terms? The items are dynamically added/removed.