From my experiments, setting flex-direction: column-reverse on the body doesn't work, it has to be a separate element. Maybe I made a mistake somewhere though. In any case, this code seems to work properly.