Skip to content

Commit

Permalink
(less) Fixes twbs#12738
Browse files Browse the repository at this point in the history
* Removes default max-height from .navbar-collapse (so not every navbar
will get a max-height collapse section)
* Scopes regular 340px max-height to fixed top and bottom navbars only
(those are the only ones that really need a max-height to enable
scrolling)
* Adds a landscape media query for phones to cap the max-height at
200px for fixed navbars"
  • Loading branch information
mdo committed Mar 10, 2014
1 parent 8b9de97 commit 7a0feea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
// content for the user's viewport.

.navbar-collapse {
max-height: @navbar-collapse-max-height;
overflow-x: visible;
padding-right: @navbar-padding-horizontal;
padding-left: @navbar-padding-horizontal;
Expand Down Expand Up @@ -88,6 +87,17 @@
}
}

.navbar-fixed-top,
.navbar-fixed-bottom {
.navbar-collapse {
max-height: @navbar-collapse-max-height;

@media (max-width: @screen-phone) and (orientation: landscape) {
max-height: 200px;
}
}
}


// Both navbar header and collapse
//
Expand Down
2 changes: 1 addition & 1 deletion variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.

// Extra small screen / phone
// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1, and @screen-xs-min as of v3.2.0
// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1
@screen-xs: 480px;
@screen-xs-min: @screen-xs;
@screen-phone: @screen-xs-min;
Expand Down

0 comments on commit 7a0feea

Please sign in to comment.