From a61a624e1d3d708128fc3ef184431d65c700e4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Le=CC=81pe=CC=81e?= Date: Fri, 30 Sep 2011 14:19:56 +0200 Subject: [PATCH 1/2] white-space: nowrap; for .label Add white-space: nowrap; for .label elements. --- bootstrap.css | 1 + bootstrap.min.css | 2 +- lib/patterns.less | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap.css b/bootstrap.css index f1a5cc7d36..e4a75e1583 100644 --- a/bootstrap.css +++ b/bootstrap.css @@ -2309,6 +2309,7 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; + white-space: nowrap; } .label.important { background-color: #c43c35; diff --git a/bootstrap.min.css b/bootstrap.min.css index b555c6553c..8ab8cc366d 100644 --- a/bootstrap.min.css +++ b/bootstrap.min.css @@ -319,7 +319,7 @@ button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0; .popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;} .popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;} .fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;} -.label{padding:1px 3px 2px;background-color:#bfbfbf;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;} +.label{padding:1px 3px 2px;background-color:#bfbfbf;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:nowrap;}.label.important{background-color:#c43c35;} .label.warning{background-color:#f89406;} .label.success{background-color:#46a546;} .label.notice{background-color:#62cffc;} diff --git a/lib/patterns.less b/lib/patterns.less index ce387614e9..0d26d3a07c 100644 --- a/lib/patterns.less +++ b/lib/patterns.less @@ -969,6 +969,7 @@ input[type=submit].btn { font-weight: bold; color: @white; text-transform: uppercase; + white-space: nowrap; .border-radius(3px); &.important { background-color: #c43c35; } &.warning { background-color: @orange; } From bdbb1c92aab9e9379341c80b8d1c53cc14ac7198 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Mon, 3 Oct 2011 10:05:43 +0100 Subject: [PATCH 2/2] Add jquery.ready hook after defining plugin, to avoid breakage when used with modernizr/yepnope See https://gist.github.com/1258742 for an example, which results in the error "TypeError: Object has no method 'dropdown' at bootstrap-dropdown.js line 31" It looks like in these circumstances, the functions hooked into jquery.ready get run immediately, and so applying the dropdown behavior to specific elements before defining the 'dropdown' method causes breakage. --- js/bootstrap-dropdown.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index a3b0b0dfa4..68a3db5f20 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -20,17 +20,6 @@ !function( $ ){ - var d = 'a.menu, .dropdown-toggle' - - function clearMenus() { - $(d).parent('li').removeClass('open') - } - - $(function () { - $('html').bind("click", clearMenus) - $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' ) - }) - /* DROPDOWN PLUGIN DEFINITION * ========================== */ @@ -47,4 +36,18 @@ }) } -}( window.jQuery || window.ender ); \ No newline at end of file + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + var d = 'a.menu, .dropdown-toggle' + + function clearMenus() { + $(d).parent('li').removeClass('open') + } + + $(function () { + $('html').bind("click", clearMenus) + $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' ) + }) + +}( window.jQuery || window.ender );