I am using Flexbox for following layout and willing to switch to CSS Grid or plain old floats if I can achieve my goal. This questions is very similar these two: detect flex wrap and select an item based on wrap state.
If my viewport has enough space to fit two flex items side by side, my second flex item should be right aligned.
If there isn't enough space, then my second flex item will wrap. But, as that happens, I want to change text alignment from right to left.