From 739ef39050c0a9f59b726eb9b0ac5a3ba96aba00 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Tue, 7 May 2013 15:20:28 +0300 Subject: [PATCH 001/135] Updated URL for jekyll installation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7579d3a992..b76a8da238 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Have a bug or a feature request? [Please open a new issue](https://github.com/tw ## Documentation -Bootstrap's docs are built using [Jekyll](http://jekyllrb.com) and hosted on GitHub Pages at [http://getbootstrap.com](http://getbootstrap.com). To view our docs locally, you'll need to [install Jekyll](https://github.com/mojombo/jekyll/wiki/install) to run a local server. +Bootstrap's docs are built using [Jekyll](http://jekyllrb.com) and hosted on GitHub Pages at [http://getbootstrap.com](http://getbootstrap.com). To view our docs locally, you'll need to [install Jekyll](http://jekyllrb.com/docs/installation) to run a local server. Documentation for [previous versions](https://github.com/twitter/bootstrap/tags) is also available via tags. From f06294d80f7a8dd0752837aab3ed5fca17d3d9be Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 7 May 2013 10:33:41 -0700 Subject: [PATCH 002/135] Outdent nav links a bit more so they line up in navbar --- docs/assets/css/bootstrap.css | 2 +- less/navbar.less | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index 67b0bd18ed..e8ddf5bb10 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -3529,7 +3529,7 @@ button.close { } .navbar-nav { - margin-top: 5px; + margin: 10px -15px 0; } .navbar-nav > li > a { diff --git a/less/navbar.less b/less/navbar.less index d4e5286a5a..494f43b6fd 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -20,7 +20,8 @@ .navbar-nav { // Space out from .navbar .brand and .btn-navbar when stacked in mobile views - margin-top: 5px; + // and outdent nav links so text lines up with logo. + margin: 10px -15px 0; > li > a { padding-top: ((@navbar-height - @line-height-base) / 2); From ad5f88e1c5384d8312655298dcff429253ad2d9c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 7 May 2013 18:03:32 -0700 Subject: [PATCH 003/135] Update config after updating to jekyll 1.0.1 --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 57a28e0a78..6b328977b2 100644 --- a/_config.yml +++ b/_config.yml @@ -8,5 +8,5 @@ permalink: pretty # Server source: ./docs destination: ./_gh_pages +port: 9001 url: http://bootstrap.dev:9001 -server_port: 9001 From d7f84d1220719cdf2272c9aa3c6731a932394c58 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 7 May 2013 18:07:06 -0700 Subject: [PATCH 004/135] Require .btn-default for regular buttons * Instead of , use for standard, gray button * Improves ability to customize buttons by encouraging folks to not override .btn and thus overriding all button modifier classes * Updates docs to reflect the change * Reorganize buttons CSS --- docs/assets/css/bootstrap.css | 111 ++++++++++---------- docs/docs.html | 187 +++++++++++++++++----------------- less/button-groups.less | 4 +- less/buttons.less | 119 ++++++++++------------ less/mixins.less | 3 +- less/variables.less | 11 +- 6 files changed, 217 insertions(+), 218 deletions(-) diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css index e8ddf5bb10..26cfc3b097 100644 --- a/docs/assets/css/bootstrap.css +++ b/docs/assets/css/bootstrap.css @@ -1830,7 +1830,7 @@ select:focus:invalid:focus { white-space: nowrap; vertical-align: middle; cursor: pointer; - border: 1px solid #a7a9aa; + border: 1px solid transparent; border-radius: 4px; } @@ -1865,72 +1865,38 @@ fieldset[disabled] .btn { box-shadow: none; } -.btn-large { - padding: 11px 14px; - font-size: 17.5px; - border-radius: 6px; -} - -.btn-small { - padding: 2px 10px; - font-size: 11.9px; - border-radius: 3px; -} - -.btn-mini { - padding: 0 6px; - font-size: 10.5px; - border-radius: 3px; -} - -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; -} - -.btn-block + .btn-block { - margin-top: 5px; -} - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} - -.btn { +.btn-default { color: #ffffff; background-color: #a7a9aa; border-color: #a7a9aa; } -.btn:hover, -.btn:focus, -.btn:active, -.btn.active { +.btn-default:hover, +.btn-default:focus, +.btn-default:active, +.btn-default.active { background-color: #9a9c9d; border-color: #8d9091; } -.btn.disabled:hover, -.btn[disabled]:hover, -fieldset[disabled] .btn:hover, -.btn.disabled:focus, -.btn[disabled]:focus, -fieldset[disabled] .btn:focus, -.btn.disabled:active, -.btn[disabled]:active, -fieldset[disabled] .btn:active, -.btn.disabled.active, -.btn[disabled].active, -fieldset[disabled] .btn.active { +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default[disabled].active, +fieldset[disabled] .btn-default.active { background-color: #a7a9aa; border-color: #a7a9aa; } .btn-primary { + color: #ffffff; background-color: #428bca; border-color: #428bca; } @@ -1960,6 +1926,7 @@ fieldset[disabled] .btn-primary.active { } .btn-warning { + color: #ffffff; background-color: #f0ad4e; border-color: #f0ad4e; } @@ -1989,6 +1956,7 @@ fieldset[disabled] .btn-warning.active { } .btn-danger { + color: #ffffff; background-color: #d9534f; border-color: #d9534f; } @@ -2018,6 +1986,7 @@ fieldset[disabled] .btn-danger.active { } .btn-success { + color: #ffffff; background-color: #5cb85c; border-color: #5cb85c; } @@ -2047,6 +2016,7 @@ fieldset[disabled] .btn-success.active { } .btn-info { + color: #ffffff; background-color: #5bc0de; border-color: #5bc0de; } @@ -2114,6 +2084,41 @@ fieldset[disabled] .btn-link:focus { text-decoration: none; } +.btn-large { + padding: 11px 14px; + font-size: 17.5px; + border-radius: 6px; +} + +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + border-radius: 3px; +} + +.btn-mini { + padding: 0 6px; + font-size: 10.5px; + border-radius: 3px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; diff --git a/docs/docs.html b/docs/docs.html index 88ab16d7ce..5b502cf896 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -2047,7 +2047,7 @@ For example, <section> should be wrapped as inline.

Button options

-

Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements for the best rendering.

+

Use any of the available button classes to quickly create a styled button.

@@ -2080,56 +2080,55 @@ For example, <section> should be wrapped as inline. {% endhighlight %} -

Button sizes

Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for additional sizes.

- - + +

- +

- - + +

- - + +

{% highlight html %}

- - + +

- +

- - + +

- - + +

{% endhighlight %}

Create block level buttons—those that span the full width of a parent— by adding .btn-block.

- - + +
{% highlight html %} - - + + {% endhighlight %} @@ -2139,12 +2138,12 @@ For example, <section> should be wrapped as inline.

Button element

Add the disabled attribute to <button> buttons.

- - + +

{% highlight html %} - + {% endhighlight %}
@@ -2155,12 +2154,12 @@ For example, <section> should be wrapped as inline.

Anchor element

Add the .disabled class to <a> buttons.

- Primary link - Link + Primary link + Link

{% highlight html %} -Primary link -Link +Primary link +Link {% endhighlight %}

We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. @@ -2171,19 +2170,19 @@ For example, <section> should be wrapped as inline.

-

One class, multiple tags

-

Use the .btn class on an <a>, <button>, or <input> element.

+

Using multiple tags

+

Use the button classes on an <a>, <button>, or <input> element.

- Link - - - + Link + + +
{% highlight html %} -Link - - - +Link + + + {% endhighlight %}
@@ -2599,20 +2598,20 @@ For example, <section> should be wrapped as inline.
- - - - + + + +
{% highlight html %}
- - - - + + + +
{% endhighlight %} @@ -2638,8 +2637,8 @@ For example, <section> should be wrapped as inline.
{% highlight html %}
- User - + User + @@ -369,11 +369,11 @@ $('#myModal').on('hidden.bs.modal', function () { @@ -389,31 +389,31 @@ $('#myModal').on('hidden.bs.modal', function () { diff --git a/js/carousel.js b/js/carousel.js index f1d035e9a5..628d72a12f 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -185,7 +185,7 @@ // CAROUSEL DATA-API // ================= - $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { var $this = $(this), href var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 var options = $.extend({}, $target.data(), $this.data()) diff --git a/js/collapse.js b/js/collapse.js index e37f255921..f8b65b393f 100644 --- a/js/collapse.js +++ b/js/collapse.js @@ -139,7 +139,7 @@ // COLLAPSE DATA-API // ================= - $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { var $this = $(this), href var target = $this.attr('data-target') || e.preventDefault() diff --git a/js/dropdown.js b/js/dropdown.js index 39c4ad258e..2bb789a791 100644 --- a/js/dropdown.js +++ b/js/dropdown.js @@ -26,10 +26,7 @@ var backdrop = '.dropdown-backdrop' var toggle = '[data-toggle=dropdown]' var Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) + var $el = $(element).on('click.bs.dropdown', this.toggle) } Dropdown.prototype.toggle = function (e) { @@ -47,7 +44,14 @@ // if mobile we we use a backdrop because click events don't delegate $('