-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto wrap with col does not work in Safari #21967
Comments
Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via JS Bin and report back with specific browser and OS details. |
I made an example available - see above. I don't have the time for more - sorry. I included the OS and the Browser in question in the first post. |
Created JSBin Reproduced this issue on the following browsers: iOS 7, Safari 7 |
Turns out this is flexbug 11, where Safari doesn't wrap flex items properly. As I understand it, Safari uses different calculations for determining how to wrap flex items. The only workaround is using .col {
flex: 1 0 50%; // where 50% is the intended size of the items
} This is the same problem #21620 faces as well. Digging into even more, a |
I got this as well. Site: danherzig.com. Happened on iOS browsers. Don't have an iPhone but got these screenshots. Fixed by reverting to prior columns (col-sm-12 and col-md-6). So the official fix was adding an invisible border? |
In my case I overrode the class .row:before, row:after, and set display: inline-block; That did the trick and did not affect Chrome and Firefox |
I'm on 4.0.0-beta.2 and am still seeing the problem on ios 8 safari. Will upgrading to the latest version of bootstrap 4 fix the problem or will I still need a workaround? If workaround needed, is it documented on the getbootstrap site? |
@pimisi suggestion wasn't working for me, but it worked changing it to |
Here's the solution: Worked like a charm! |
The border didn't work for me, it changed nothing on ios 10, and the explicit flex is too restrictive. What I've done is adding @media (min-width: 576px) {
#BugFix {
display: none;
}
} |
Reading the grid docs from top to bottom, this section made no sense to me. I didn't understand why you wouldn't just use multiple rows, and I had no idea what w-100 meant, or how you'd "mix" it with "responsive display utilities". Then I continued reading and got to https://getbootstrap.com/docs/4.4/layout/grid/#column-breaks which explains the same concept but with a much better explanation and examples (including the responsive display utilities). It looks like the "Equal-width multi-line" section was added in 9010978 to resolve to twbs#21967 as a way to document the existence of a Safari bug. But that bug has long since been fixed (Safari 10.1 came out in May 2017) and so I think it's reasonable to just drop this section and rely on the better docs further down in the guide.
This code will not auto wrap in Safari 10.0.3 (OSX 10.12).
Basically using class="col" in order to auto wrap columns will not work. The columns are displayed outside page margins.
Chrome and FF behave as expected.
The text was updated successfully, but these errors were encountered: