[web] Add flex layout handling for CMS pages GitOrigin-RevId: d7c2806449fba19dc81356deef9b9f61deff14c4