From c15f5a89a07316404b289fc0c65db1a4e52c95d1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 5 Aug 2013 14:19:32 -0700 Subject: Enable scrollable responsive nav bar Fixes #9007 in a hopefully decent way --- less/navbar.less | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 374327f12..98ad5383c 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -82,6 +82,8 @@ } .navbar-fixed-top { top: 0; + .nav-collapse { + } } .navbar-fixed-bottom { bottom: 0; @@ -89,6 +91,26 @@ } +// Scrollable navbar navigation +// +// Sometimes you might have too many links in your fixed navbar and you need to +// maintain access to all that content. To help, add `.nav-collapse-scrollable` +// to your `.nav-collapse` to prevent the the content from flowing past the max- +// height of your browser. +// +// This is not automatically added to the `.navbar-fixed-top` because it causes +// z-index bugs in iOS7 (possibly earlier). + +@media (max-width: @screen-small) { + .nav-collapse-scrollable { + margin-bottom: @navbar-padding-vertical; + max-height: 360px; + overflow-y: scroll; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; + } +} + // // Navbar optional components -- cgit v1.2.3