Generalize some flexbox rules