From 475b985a0efaf534b56089f12c570d7861ce72f5 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 16:37:43 -0800 Subject: [PATCH 01/23] remove padding from first-child of inline radios/checkboxes --- docs/assets/css/bootstrap.css | 3 +++ less/forms.less | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index e928bb6d1e..1b572090c9 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -596,6 +596,9 @@ input[type="hidden"] { .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { margin-left: 10px; } +.controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child { + padding-top: 5px; +} input, textarea { -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); diff --git a/less/forms.less b/less/forms.less index b0daeb034e..69ddbcac93 100644 --- a/less/forms.less +++ b/less/forms.less @@ -175,6 +175,11 @@ input[type="hidden"] { .checkbox.inline + .checkbox.inline { margin-left: 10px; // space out consecutive inline controls } +// But don't forget to remove their padding on first-child +.controls > .radio.inline:first-child, +.controls > .checkbox.inline:first-child { + padding-top: 5px; // has to be padding because margin collaspes +} From 06df91ac559686e947c3c1fbfbdd2b7dcfc5a56b Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 16:48:03 -0800 Subject: [PATCH 02/23] remove background from accordion, and use border instead --- docs/assets/css/bootstrap.css | 6 ++---- less/accordion.less | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 1b572090c9..bf1116f538 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3165,7 +3165,8 @@ a.thumbnail:hover { margin-bottom: 18px; } .accordion-group { - background-color: #f5f5f5; + margin-bottom: 2px; + border: 1px solid #e5e5e5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; @@ -3177,9 +3178,6 @@ a.thumbnail:hover { display: block; padding: 8px 15px; } -.accordion-body { - margin-bottom: 2px; -} .accordion-inner { padding: 9px 15px; border-top: 1px solid #e5e5e5; diff --git a/less/accordion.less b/less/accordion.less index 1ebd5b1a1a..11a36b544e 100644 --- a/less/accordion.less +++ b/less/accordion.less @@ -9,7 +9,8 @@ // Group == heading + body .accordion-group { - background-color: #f5f5f5; + margin-bottom: 2px; + border: 1px solid #e5e5e5; .border-radius(4px); } .accordion-heading { @@ -19,9 +20,6 @@ display: block; padding: 8px 15px; } -.accordion-body { - margin-bottom: 2px; -} // Inner needs the styles because you can't animate properly with any styles on the element .accordion-inner { From 4fa931e403ec3ae2f8f7f690c6c4040365f68ba9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:11:31 -0800 Subject: [PATCH 03/23] fix the navbar click and a few jank responsive problems --- docs/assets/css/bootstrap-responsive.css | 140 ++++++++++++++--------- docs/assets/css/bootstrap.css | 4 +- docs/assets/css/docs.css | 23 +++- docs/base-css.html | 2 +- docs/components.html | 81 +++++++------ docs/templates/pages/base-css.mustache | 2 +- docs/templates/pages/components.mustache | 81 +++++++------ less/navbar.less | 4 +- less/responsive.less | 25 ++-- 9 files changed, 209 insertions(+), 153 deletions(-) diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index 631c904e79..b0fbd9d7ba 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -175,22 +175,23 @@ margin-bottom: 36px; } .navbar-inner { - padding: 10px; + padding: 5px; background-image: none; } .navbar .container { padding: 0; } .navbar .brand { - float: none; - display: block; - padding-left: 15px; - padding-right: 15px; - margin: 0; + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + .navbar .nav-collapse { + clear: left; } .navbar .nav { float: none; - margin: 9px 0; + margin: 0 0 9px; } .navbar .nav > li { float: none; @@ -217,8 +218,10 @@ } .navbar .dropdown-menu { position: static; - display: block; + top: auto; + left: auto; float: none; + display: block; max-width: none; margin: 0 15px; padding: 0; @@ -263,60 +266,83 @@ height: 0; } } -/* @media (min-width: 1210px) { - - // Reset grid variables - @gridColumns: 12; - @gridColumnWidth: 70px; - @gridGutterWidth: 30px; - @siteWidth: 1170px; - - // Bring grid mixins to recalculate widths - .columns(@columns: 1) { - width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)); - } - .offset(@columns: 1) { - margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); - } - .container { - width: @siteWidth; + width: 1170px; } .row { - margin-left: @gridGutterWidth * -1; + margin-left: -30px; } [class*="span"] { - margin-left: @gridGutterWidth; + margin-left: 30px; + } + .span1 { + width: 70px; + } + .span2 { + width: 170px; + } + .span3 { + width: 270px; + } + .span4 { + width: 370px; + } + .span5 { + width: 470px; + } + .span6 { + width: 570px; + } + .span7 { + width: 670px; + } + .span8 { + width: 770px; + } + .span9 { + width: 870px; + } + .span10 { + width: 970px; + } + .span11 { + width: 1070px; + } + .span12 { + width: 1170px; + } + .offset1 { + margin-left: 130px; + } + .offset2 { + margin-left: 230px; + } + .offset3 { + margin-left: 330px; + } + .offset4 { + margin-left: 430px; + } + .offset5 { + margin-left: 530px; + } + .offset6 { + margin-left: 630px; + } + .offset7 { + margin-left: 730px; + } + .offset8 { + margin-left: 830px; + } + .offset9 { + margin-left: 930px; + } + .offset10 { + margin-left: 1030px; + } + .offset11 { + margin-left: 1130px; } - - // Default columns - .span1 { .columns(1); } - .span2 { .columns(2); } - .span3 { .columns(3); } - .span4 { .columns(4); } - .span5 { .columns(5); } - .span6 { .columns(6); } - .span7 { .columns(7); } - .span8 { .columns(8); } - .span9 { .columns(9); } - .span10 { .columns(10); } - .span11 { .columns(11); } - .span12 { .columns(12); } - - // Offset column options - .offset1 { .offset(1); } - .offset2 { .offset(2); } - .offset3 { .offset(3); } - .offset4 { .offset(4); } - .offset5 { .offset(5); } - .offset6 { .offset(6); } - .offset7 { .offset(7); } - .offset8 { .offset(8); } - .offset9 { .offset(9); } - .offset10 { .offset(10); } - .offset11 { .offset(11); } - .offset12 { .offset(12); } - } -*/ \ No newline at end of file diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index bf1116f538..6916e9361a 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -2315,8 +2315,8 @@ button.btn.small, input[type="submit"].btn.small { display: none; float: right; padding: 7px 10px; - margin-left: 10px; - margin-right: 10px; + margin-left: 5px; + margin-right: 5px; background-color: #2c2c2c; background-image: -moz-linear-gradient(top, #333333, #222222); background-image: -ms-linear-gradient(top, #333333, #222222); diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index b06065365f..cc7ca0c639 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -522,6 +522,7 @@ h2 + .row { /* Example sites showcase */ .example-sites img { max-width: 100%; + margin: 0 auto; } .marketing-byline { margin: -18px 0 27px; @@ -646,6 +647,10 @@ form.well { padding: 10px 14px; margin: 0 auto 10px; } + /* Masthead (home page jumbotron) */ + .masthead { + padding-top: 0; + } /* Don't space out quick links so much */ .quick-links { @@ -669,8 +674,9 @@ form.well { display: block; max-width: 300px; margin: 0 auto 18px; + text-align: center; } - .example-sites img { + .example-sites .thumbnail > img { max-width: 270px; } @@ -796,11 +802,20 @@ form.well { /* Unfloat brand */ .navbar-fixed-top .brand { - float: none; + float: left; margin-left: 0; - padding-left: 15px; - padding-right: 15px; + padding-left: 10px; + padding-right: 10px; } } +/* LARGE DESKTOP SCREENS */ +@media (min-width: 1210px) { + + /* Update subnav container */ + .subnav-fixed .nav { + width: 1168px; /* 2px less to account for left/right borders being removed when in fixed mode */ + } + +} diff --git a/docs/base-css.html b/docs/base-css.html index c68391261c..4651e9789c 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -1497,7 +1497,7 @@ For example, <code>section</code> should be wrapped as inline.
- +
diff --git a/docs/components.html b/docs/components.html index a2fac7360b..950d1f35c7 100644 --- a/docs/components.html +++ b/docs/components.html @@ -662,40 +662,47 @@ @@ -733,7 +740,7 @@ <input type="text" class="search-query pull-left" placeholder="Search"> </form> - +

Nav links

Nav items are simple to add via unordered lists.

@@ -763,9 +770,9 @@ </li> </ul> -

Get the javascript →

-
- +

Get the javascript →

+ + diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 6cbb111acb..c15fcebd39 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -1425,7 +1425,7 @@
- +
diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index 363ed1ba13..3a92953ae7 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -590,40 +590,47 @@ @@ -661,7 +668,7 @@ <input type="text" class="search-query pull-left" placeholder="{{_i}}Search{{/i}}"> </form> - +

{{_i}}Nav links{{/i}}

{{_i}}Nav items are simple to add via unordered lists.{{/i}}

@@ -691,9 +698,9 @@ </li> </ul> -

{{_i}}Get the javascript →{{/i}}

-
- +

{{_i}}Get the javascript →{{/i}}

+ + diff --git a/less/navbar.less b/less/navbar.less index 379cbb56d9..4fd8a9073d 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -21,8 +21,8 @@ display: none; float: right; padding: 7px 10px; - margin-left: 10px; - margin-right: 10px; + margin-left: 5px; + margin-right: 5px; .buttonBackground(@navbarBackgroundHighlight, @navbarBackground); @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); .box-shadow(@shadow); diff --git a/less/responsive.less b/less/responsive.less index 6c3102c14f..0955710b6f 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -202,7 +202,7 @@ margin-bottom: @baseLineHeight * 2; } .navbar-inner { - padding: 10px; + padding: 5px; background-image: none; } .navbar .container { @@ -210,16 +210,18 @@ } // Account for brand name .navbar .brand { - float: none; - display: block; - padding-left: 15px; - padding-right: 15px; - margin: 0; + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + // Nav collapse clears brand + .navbar .nav-collapse { + clear: left; } // Block-level the nav .navbar .nav { float: none; - margin: (@baseLineHeight / 2) 0; + margin: 0 0 (@baseLineHeight / 2); } .navbar .nav > li { float: none; @@ -248,8 +250,10 @@ // Dropdowns in the navbar .navbar .dropdown-menu { position: static; - display: block; + top: auto; + left: auto; float: none; + display: block; max-width: none; margin: 0 15px; padding: 0; @@ -301,7 +305,7 @@ // LARGE DESKTOP & UP // ------------------ -/* + @media (min-width: 1210px) { // Reset grid variables @@ -317,7 +321,6 @@ .offset(@columns: 1) { margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); } - .container { width: @siteWidth; } @@ -354,7 +357,5 @@ .offset9 { .offset(9); } .offset10 { .offset(10); } .offset11 { .offset(11); } - .offset12 { .offset(12); } } -*/ \ No newline at end of file From e532228721734492d6f2741f729525cc1bb3c77c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:25:05 -0800 Subject: [PATCH 04/23] more responsive tweaks for tablet --- docs/assets/css/bootstrap-responsive.css | 55 +++++++++++------------- less/responsive.less | 14 +++--- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index b0fbd9d7ba..bbfc0ac5ab 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -89,81 +89,78 @@ } @media (min-width: 768px) and (max-width: 940px) { .container { - width: 748px; - padding-left: 10px; - padding-right: 10px; + width: 724px; + padding-left: 20px; + padding-right: 20px; } .span1 { - width: 44px; + width: 42px; } .span2 { - width: 108px; + width: 104px; } .span3 { - width: 172px; + width: 166px; } .span4 { - width: 236px; + width: 228px; } .span5 { - width: 300px; + width: 290px; } .span6 { - width: 364px; + width: 352px; } .span7 { - width: 428px; + width: 414px; } .span8 { - width: 492px; + width: 476px; } .span9 { - width: 556px; + width: 538px; } .span10 { - width: 620px; + width: 600px; } .span11 { - width: 684px; + width: 662px; } .span12 { - width: 748px; + width: 724px; } .offset1 { - margin-left: 84px; + margin-left: 82px; } .offset2 { - margin-left: 148px; + margin-left: 144px; } .offset3 { - margin-left: 212px; + margin-left: 206px; } .offset4 { - margin-left: 276px; + margin-left: 268px; } .offset5 { - margin-left: 340px; + margin-left: 330px; } .offset6 { - margin-left: 404px; + margin-left: 392px; } .offset7 { - margin-left: 468px; + margin-left: 454px; } .offset8 { - margin-left: 532px; + margin-left: 516px; } .offset9 { - margin-left: 596px; + margin-left: 578px; } .offset10 { - margin-left: 660px; + margin-left: 640px; } .offset11 { - margin-left: 724px; - } - .offset12 { - margin-left: 788px; + margin-left: 702px; } } @media (max-width: 940px) { diff --git a/less/responsive.less b/less/responsive.less index 0955710b6f..fba5b3656c 100644 --- a/less/responsive.less +++ b/less/responsive.less @@ -135,10 +135,10 @@ @media (min-width: 768px) and (max-width: 940px) { // Reset grid variables - @gridColumns: 16; - @gridColumnWidth: 44px; + @gridColumns: 12; + @gridColumnWidth: 42px; @gridGutterWidth: 20px; - @siteWidth: 748px; + @siteWidth: 724px; // Bring grid mixins to recalculate widths .columns(@columns: 1) { @@ -148,11 +148,11 @@ margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2); } - // 16cols at 30px wide with 16px gutters + // 12cols at 44px wide with 20px gutters .container { width: @siteWidth; - padding-left: 10px; - padding-right: 10px; + padding-left: 20px; + padding-right: 20px; } // Default columns @@ -181,7 +181,6 @@ .offset9 { .offset(9); } .offset10 { .offset(10); } .offset11 { .offset(11); } - .offset12 { .offset(12); } } @@ -295,6 +294,7 @@ display: block; } + // Hide everything in the navbar save .brand and toggle button */ .nav-collapse { overflow: hidden; height: 0; From e17c9249d2bef78355711ce305e1a8d36bd75c3e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:27:09 -0800 Subject: [PATCH 05/23] fix dropdowns in subnav --- docs/assets/css/docs.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index cc7ca0c639..430191a6fc 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -732,7 +732,7 @@ form.well { .subnav .nav > li > a { border: 0; } - .subnav .nav > li + li a { + .subnav .nav > li + li > a { border-top: 1px solid #e5e5e5; } From 99ac6ca08ed27126d2ad1dd4d0e820205aab9c48 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:39:36 -0800 Subject: [PATCH 06/23] update components page to include docs for the new navbar collapse feature, re-add responsive.less to downloader --- docs/components.html | 29 +++++++++++++++++++++++- docs/download.html | 6 +---- docs/templates/pages/components.mustache | 29 +++++++++++++++++++++++- docs/templates/pages/download.mustache | 6 +---- 4 files changed, 58 insertions(+), 12 deletions(-) diff --git a/docs/components.html b/docs/components.html index 950d1f35c7..710e7de77c 100644 --- a/docs/components.html +++ b/docs/components.html @@ -467,7 +467,7 @@

Nav links

diff --git a/docs/download.html b/docs/download.html index 5bcce7cedc..832b07ce65 100644 --- a/docs/download.html +++ b/docs/download.html @@ -135,12 +135,8 @@ - +
diff --git a/docs/templates/pages/components.mustache b/docs/templates/pages/components.mustache index 3a92953ae7..5c91431fa1 100644 --- a/docs/templates/pages/components.mustache +++ b/docs/templates/pages/components.mustache @@ -395,7 +395,7 @@

{{_i}}Nav links{{/i}}

diff --git a/docs/templates/pages/download.mustache b/docs/templates/pages/download.mustache index dccc5fbb66..34f8130ac1 100644 --- a/docs/templates/pages/download.mustache +++ b/docs/templates/pages/download.mustache @@ -63,12 +63,8 @@ - +
From cf1b46bda4853e8501c2b9587219535376a9cc36 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 18:46:41 -0800 Subject: [PATCH 07/23] fix alert close position --- docs/assets/css/bootstrap.css | 1 + less/alerts.less | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 6916e9361a..43ef8547f5 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -2002,6 +2002,7 @@ button.btn.small, input[type="submit"].btn.small { } .alert .close { position: relative; + top: -2px; right: -21px; line-height: 18px; } diff --git a/less/alerts.less b/less/alerts.less index 23c17e7041..562826fd30 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -18,6 +18,7 @@ // Adjust close link position .alert .close { position: relative; + top: -2px; right: -21px; line-height: 18px; } From 3e462f1fb27b3ca97135948dc74ccef55336c8bb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 20:26:27 -0800 Subject: [PATCH 08/23] update docs to simplify some css --- docs/assets/css/docs.css | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index 430191a6fc..f36fa76d61 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -106,35 +106,6 @@ hr.soften { } -/* Benefits list in masthead */ -.benefits { - display: none; - width: 260px; - position: absolute; - right: 0; - bottom: 0; -} -.benefits ul { - list-style: none; - margin: 0; -} -.benefits li { - font-size: 16px; - font-weight: 300; - line-height: 35px; - color: #555; -} -.benefits li + li { - border-top: 1px solid #f5f5f5; -} -.benefits h4 { - color: #555; -} -.benefits span { - padding-right: 5px; - color: #999; -} - /* Specific jumbotrons ------------------------- */ /* supporting docs pages */ @@ -175,7 +146,6 @@ hr.soften { margin: 0; padding-top: 11px; padding-bottom: 11px; - font-size: 13px; border-left: 1px solid #f5f5f5; border-right: 1px solid #e5e5e5; -webkit-border-radius: 0; From 5f314dcb85b011d30bbe845e00932a9a550d4e71 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 28 Jan 2012 20:27:18 -0800 Subject: [PATCH 09/23] remove benefits from homepage html --- docs/index.html | 12 ------------ docs/templates/pages/index.mustache | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/docs/index.html b/docs/index.html index 89f5accd68..69972c8437 100644 --- a/docs/index.html +++ b/docs/index.html @@ -82,18 +82,6 @@ View project on GitHub Download Bootstrap

-
-

Feature highlights

-
    -
  • Built on LESS
  • -
  • Complete style guide docs
  • -
  • Fully responsive design
  • -
  • Small footprint (10kb gzipped)
  • -
  • Support for IE7 and up
  • -
  • Custom jQuery plugins
  • -
  • Dozens of components
  • -
-