Closed (fixed)
Project:
Bootstrap
Version:
8.x-3.x-dev
Component:
Templates
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2016 at 13:30 UTC
Updated:
31 Oct 2016 at 03:24 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
georgebrook commentedI have noticed that in the page.tpl.php for the Drupal 7's bootstrap there is a container wrapping the contents of the header which adds a padding to eaither side of the navbar. A similar effect can be seen here: https://getbootstrap.com/examples/navbar/ Not sure if there was a reason to remove this
containerwrapper but I have created a patch which adds this and seems to safely fix the issue.This is my first patch and contribution to Drupal so be nice :)
Comment #3
markhalliwellIIRC, I was attempting to deal with this related issue.
I'm not entirely sure a container wrapper is necessary. It's probably some CSS override stuff that is causing it?
Comment #4
georgebrook commentedYes, the only declalred CSS rule I could find was the negative 15px margin on
.navbar-rightwhich, when removed, and without the container wrapper, looks like this.. (attached)Comment #5
markhalliwellComment #6
markhalliwellOops, wrong status.
Comment #7
markhalliwellThis wrapper should only show up if anything but the "normal" navbar position is used, otherwise we reintroduce the issue in #2452703: Containers (`.container` and `.container-fluid`) are not nestable.
Furthermore, the LESS overrides for this also need to be removed in the patch.
Comment #8
markhalliwellBump
Comment #9
jorgediazhav commentedThe problem is a Toolbar Module specific CSS behaviour on mobile.
This patch is for the overrides /css folder. I made all changes on the /starterkits/less/less/component/navbar.less
I have tested this fix on Firefox 47.x and Chrome 51 with:
- Fixed Top Navbar.
- Fixed Bottom Navbar.
Please review guys!
Comment #10
jorgediazhav commentedOops my bad, I mixed 2 different issues. Sorry :(
Forget this patch, it doesn't belong here.
Comment #11
toomanypets commentedHere is a revised patch per markcarver's comments in #7.
Comment #12
toomanypets commentedFixed file name.
Edit: Actually, I made it worse. Files are identical. I need coffee.
Comment #13
toomanypets commentedComment #14
markhalliwellThis is overly complicated and gets into the internal mechanisms of the Attribute class. It can simply be written like the following so it uses the available helper method:
---
Furthermore, my comments about needing to remove the LESS overrides have gone unnoticed.
Comment #15
toomanypets commentedMark, thanks for the review. I've revised the class test per your comments, but I don't see any LESS overrides in this patch. Please explain. Thanks.
Comment #16
markhalliwellI'm pretty sure that the following styles need to re-evaluated as they are unlikely necessary anymore.
LESS:
http://cgit.drupalcode.org/bootstrap/tree/starterkits/less/less/componen...
http://cgit.drupalcode.org/bootstrap/tree/starterkits/less/less/componen...
SASS:
http://cgit.drupalcode.org/bootstrap/tree/starterkits/sass/sass/componen...
http://cgit.drupalcode.org/bootstrap/tree/starterkits/sass/sass/componen...
Comment #17
toomanypets commentedThese bits are still required when navbar position is Normal, otherwise the navbar is a tad too wide:
http://cgit.drupalcode.org/bootstrap/tree/starterkits/less/less/componen...
http://cgit.drupalcode.org/bootstrap/tree/starterkits/sass/sass/componen...
The other bits have been removed; there is never a case where we'll have a container within a container.
I tested by transpiling the modified LESS code. I did not test the modified SASS code. Patch consists of #15 plus LESS/SASS changes.
Comment #18
toomanypets commentedComment #20
markhalliwell