How to target the last element before break occurs in a flexbox design?

You could conceivably use a media query to target the second item after the subsequent items have wrapped. Barring that option, it's not possible with CSS.

Wrapping is not a behavior that is tracked by CSS. For example, a container has no idea when its children wrap. Therefore, there is no way to target items with CSS based on wrapping scenarios (except with media queries, as mentioned above).

More details here: Make container shrink-to-fit child elements as they wrap

Tags:

Css

Flexbox