Why would we use flex-direction: row-reverse/column-reverse;?


#1

Question

Why would we use flex-direction: row-reverse/column-reverse;?

Answer

The use of flex-direction: row-reverse/column-reverse; will mostly be decided by design/layout specifications for our site, however, a couple great use cases:

  • altering the order of flex items with CSS instead of JavaScript, for example: clicking a sort button could switch order of elements from ascending to descending
  • altering the order of flex items for CSS animations/transitions/effects