Edit in JSFiddle

const styles = `
  .parent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
  }
`;


previousTests(styles);
newTests(styles);