From f9a47e3a5fc1f91f041f2d8cb264f1d5af142126 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 30 Nov 2012 12:42:37 -0800 Subject: [PATCH] Refine containers and navbars * Don't reset width on .container, .navbar-* .container, etc * Instead, use max-width to ensure proper styling for all navbars --- docs/assets/css/bootstrap.css | 12 ++++-------- less/grid.less | 6 +++--- less/responsive-1200px-min.less | 6 ++---- less/tests/navbar-fixed-top.html | 2 +- less/tests/navbar-static-top.html | 2 +- less/tests/navbar.html | 2 +- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 30512c734..a227de682 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -223,10 +223,8 @@ a:hover { border-radius: 500px; } -.container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { - width: 940px; +.container { + max-width: 940px; } .row { @@ -5458,10 +5456,8 @@ a.badge:hover { } @media (min-width: 1200px) { - .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 1170px; + .container { + max-width: 1170px; } .row { margin-right: -15px; diff --git a/less/grid.less b/less/grid.less index 836e29a95..817ead2ee 100644 --- a/less/grid.less +++ b/less/grid.less @@ -4,9 +4,9 @@ // Set the container width, and override it for fixed navbars in media queries -.container, -.navbar-fixed-top .container, -.navbar-fixed-bottom .container { width: 940px; } +.container { + max-width: 940px; +} // Fixed (940px) #grid > .core(@gridColumnWidth, @gridGutterWidth, @gridRowWidth); diff --git a/less/responsive-1200px-min.less b/less/responsive-1200px-min.less index aa7d9b9d7..130c65d0d 100644 --- a/less/responsive-1200px-min.less +++ b/less/responsive-1200px-min.less @@ -6,10 +6,8 @@ @media (min-width: 1200px) { // Set the container width, and override it for fixed navbars in media queries - .container, - .navbar-fixed-top .container, - .navbar-fixed-bottom .container { - width: 1170px; + .container { + max-width: 1170px; } // Fixed grid diff --git a/less/tests/navbar-fixed-top.html b/less/tests/navbar-fixed-top.html index 46a59ec69..9acf367e1 100644 --- a/less/tests/navbar-fixed-top.html +++ b/less/tests/navbar-fixed-top.html @@ -75,7 +75,7 @@

Navbar example

This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

- View navbar docs » + View navbar docs »

diff --git a/less/tests/navbar-static-top.html b/less/tests/navbar-static-top.html index 037f4e821..52928e464 100644 --- a/less/tests/navbar-static-top.html +++ b/less/tests/navbar-static-top.html @@ -78,7 +78,7 @@

Navbar example

This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

- View navbar docs » + View navbar docs »

diff --git a/less/tests/navbar.html b/less/tests/navbar.html index 5129a84f8..3240aff8f 100644 --- a/less/tests/navbar.html +++ b/less/tests/navbar.html @@ -78,7 +78,7 @@

Navbar example

This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

- View navbar docs » + View navbar docs »