Fix margins and paddings on flex boxes.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/693353003