-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Fix container within navbar on smallest breakpoint #21722
Conversation
i like this, and this bug (?) is open in some other issues as well. One thing I proposed was instead of setting the margins, set the |
It does accomplish the same thing. But the problem come from here where we set |
Actually, revisiting this PR it seems it's related to a Chrome bug. It works normally in Safari and Firefox not in Chrome. So not really sure we should include this fix in the code base as it seems related to a browser bug... |
@vanduynslagerp if you could write a reduced test case (i.e without Bootstrap), then I can organise to file a Chrome bug. |
Here you go: http://jsfiddle.net/Lgn9v9zt/ The problem is then a flex container with Bootstrap works as expected in Safari but not in Chrome or Firefox. So I think the fix in this PR is still relevant. On Mac OS X 10.12.2 and I'm using:
|
Ahhh, I understand the issue now. Auto margins are basically like pushes or pulls on flex items. We use |
Yes, I think the bug is in Safari too. So this PR (or similar) is still relevant. |
* bootstrap/v4-dev: (979 commits) Add aria-label to docs search field Remove random cursor: default from pill nav (twbs#21835) Allow button toolbars to wrap (twbs#21826) fixes twbs#21567 grunt (fixes twbs#21819) Add align self to navbar brand (twbs#21626) Rename order utilities to intended class names (twbs#21739) Pixel perfect navbar toggler (twbs#21821) Update _custom.scss imports in other builds (twbs#21825) Allow flex-based navs to wrap like they used to (twbs#21824) Remove `cursor: pointer;` (twbs#21812) Fix body padding in Dashboard and Jumbotron examples. Move htmllint to npm script. Change to markdown (twbs#21815) Change header to use markdown (twbs#21809) Update grid layout docs (twbs#21806) grunt Drop Normalize, port relevant parts to Reboot (twbs#21741) grunt Fix container within navbar on smallest breakpoint (twbs#21722) ...
* bootstrap/v4-dev: (979 commits) Add aria-label to docs search field Remove random cursor: default from pill nav (twbs#21835) Allow button toolbars to wrap (twbs#21826) fixes twbs#21567 grunt (fixes twbs#21819) Add align self to navbar brand (twbs#21626) Rename order utilities to intended class names (twbs#21739) Pixel perfect navbar toggler (twbs#21821) Update _custom.scss imports in other builds (twbs#21825) Allow flex-based navs to wrap like they used to (twbs#21824) Remove `cursor: pointer;` (twbs#21812) Fix body padding in Dashboard and Jumbotron examples. Move htmllint to npm script. Change to markdown (twbs#21815) Change header to use markdown (twbs#21809) Update grid layout docs (twbs#21806) grunt Drop Normalize, port relevant parts to Reboot (twbs#21741) grunt Fix container within navbar on smallest breakpoint (twbs#21722) ...
Fixes #21605 and fixes #21590.
At the smallest breakpoint the
container
has nowith
set. In the case of acontainer
within anavbar
, due tomargin-right: auto
andmargin-left: auto
the container content is coalesced toward the center.This issue happen only in Chrome (see http://jsfiddle.net/rLqtw01t/ in chrome on xs viewport with and in another browser).
This PR set
margin-right: 0
andmargin-left: 0
forcontainer
withinnavbar
under xs viewport width to avoid the issue.