Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am using the latest version of Bootstrap (3.0.3) and have the ability to change the number of columns from the default 12 to 16. In our sub-theme's variables.less file, I've changed the @grid-columns variable to '16' and changed the @grid-gutter-width from '30px' to '20px'.
When we did this, the navbar container was not lining up with edges of our main-container.
In overrides.less, the navbar container media queries hardcode the default @grid-gutter-width of 30px instead of using the variable.
// Default navbar.
.navbar.container {
@media @tablet {
max-width: ((@container-sm - 30px));
}
@media @normal {
max-width: ((@container-md - 30px));
}
@media @wide {
max-width: ((@container-lg - 30px));
}
Instead of 30px, this should be @grid-gutter-width.
Comment | File | Size | Author |
---|---|---|---|
#1 | bootstrap-navbar-container-media-query-to-use-gutter-width-variable-2178429-1.patch | 687 bytes | trevorkjorlien |
Comments
Comment #1
trevorkjorlien CreditAttribution: trevorkjorlien commentedAttached patch to use @grid-gutter-width variable.
Comment #2
trevorkjorlien CreditAttribution: trevorkjorlien commentedComment #3
markhalliwellThanks @trevorkjorlien!
Committed 919a729 to 7.x-3.x:
Comment #6
ryan.armstrong CreditAttribution: ryan.armstrong commentedMoving this to the 8.x-3.x branch as it has been committed to that branch. Making sure the fix gets tested in the Drupal 8 release.
Comment #7
ryan.armstrong CreditAttribution: ryan.armstrong commentedComment #9
markhalliwellI'm just moving this back to 7.x. If this needs re-evaluation in 8.x, create a new issue.