Is it possible to mix flexbox direction in desktop vs mobile?

Viewed 11

In desktop I want my divs' to be in one line, but in mobile I want my second div on a new row (and first and the third at the same line). Is that possible?

Desktop vs mobile

1 Answers

I think I found a solution by my self... not sure if it's the right way to do it, but I think it works. :) .panel is no 2 in my image above.

DESKTOP

.panel {
    padding: 0;
   overflow: hidden;
   color: #999;
   font-size: 25px;
   line-height: 30px;
   flex: 1 1 auto;
   display: none;
}

MOBILE

.panel {
    order: 3; 
    flex: 0 0 auto;
    width: 100%;
    padding-top: 20px;
}
Related