If you ever end up converting a boostrap v3 row div to flexbox, be sure to remove the :before pseudo-element or you might waste a non-trivial amount of time wondering why flexbox wasn’t working right.
Some things that might happen (These seem especially common on Safari, macOS and iOS)
-
justify-content: flex-start doesn’t touch the start (because there’s a hidden element in the way)
-
flex-wrap: wrap might appear to wrap too soon, leaving an odd number of elements on the first line. It’s working right, it’s just adding the hidden element into the caclulation.
The solution is to remove the pseudo-element from the document by overriding its style with content: none;:
.flex.row {
display: flex;
}
.flex.row:before {
content: none;
}