Skip to content

CSS autoprefixer breaking flexbox in Safari #2450

Closed
@ttches

Description

@ttches

From create-react-app's readme @ https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md

.App {
  display: flex;
  flex-direction: row;
  align-items: center;
}

becomes

.App {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

In practice, after running yarn build, it becomes:

.App {
  display:-ms-flexbox;
  display:flex;
  -ms-flex-direction:row;
  flex-direction:row;
  -ms-flex-align:center;
  align-items:center
}

I believe this missing -webkit- is breaking my websites in Safari. Does anyone know how this can be prevented or if I am doing anything incorrectly? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions