From 111ea9f96a3932ce29c8ca5ee062764858302d87 Mon Sep 17 00:00:00 2001 From: Kendall Hopkins Date: Wed, 1 Feb 2012 14:52:36 -0500 Subject: [PATCH 01/10] Namespace the CSS. --- less/accordion.less | 2 ++ less/alerts.less | 2 ++ less/breadcrumbs.less | 2 ++ less/button-groups.less | 3 ++- less/buttons.less | 2 ++ less/carousel.less | 2 ++ less/close.less | 4 +++- less/code.less | 4 +++- less/component-animations.less | 4 +++- less/dropdowns.less | 2 ++ less/forms.less | 2 ++ less/grid.less | 4 +++- less/hero-unit.less | 2 ++ less/layouts.less | 4 +++- less/modals.less | 2 ++ less/navbar.less | 4 +++- less/navs.less | 2 ++ less/pager.less | 4 +++- less/pagination.less | 2 ++ less/popovers.less | 2 ++ less/progress-bars.less | 2 ++ less/reset.less | 2 ++ less/responsive.less | 2 ++ less/scaffolding.less | 2 ++ less/sprites.less | 2 ++ less/tables.less | 2 ++ less/thumbnails.less | 2 ++ less/tooltip.less | 2 ++ less/type.less | 2 ++ less/utilities.less | 2 ++ less/wells.less | 2 ++ 31 files changed, 69 insertions(+), 8 deletions(-) diff --git a/less/accordion.less b/less/accordion.less index 31b8cdc33d63..c71e6ffe8ebe 100644 --- a/less/accordion.less +++ b/less/accordion.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // ACCORDION // --------- @@ -31,3 +32,4 @@ padding: 9px 15px; border-top: 1px solid #e5e5e5; } +} diff --git a/less/alerts.less b/less/alerts.less index 46a0d77bfda8..4e0f6cbf3780 100644 --- a/less/alerts.less +++ b/less/alerts.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // ALERT STYLES // ------------ @@ -56,3 +57,4 @@ .alert-block p + p { margin-top: 5px; } +} diff --git a/less/breadcrumbs.less b/less/breadcrumbs.less index 111f12279fa7..4d93a55151ee 100644 --- a/less/breadcrumbs.less +++ b/less/breadcrumbs.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // BREADCRUMBS // ----------- @@ -22,3 +23,4 @@ color: @grayDark; } } +} diff --git a/less/button-groups.less b/less/button-groups.less index 5338c5a4502c..bfc15e8e2c44 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // BUTTON GROUPS // ------------- @@ -188,4 +189,4 @@ .opacity(75); } } - +} diff --git a/less/buttons.less b/less/buttons.less index c44ff3e6fc63..3247409cb702 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // BUTTON STYLES // ------------- @@ -189,3 +190,4 @@ input[type="submit"].btn { *padding-bottom: 1px; } } +} diff --git a/less/carousel.less b/less/carousel.less index 8fbd303154ad..a80a776f1328 100644 --- a/less/carousel.less +++ b/less/carousel.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // CAROUSEL // -------- @@ -119,3 +120,4 @@ .carousel-caption p { color: @white; } +} diff --git a/less/close.less b/less/close.less index 31fe6fcb369f..e43867ebda12 100644 --- a/less/close.less +++ b/less/close.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // CLOSE ICONS // ----------- @@ -26,4 +27,5 @@ button.close { background: transparent; border: 0; -webkit-appearance: none; -} \ No newline at end of file +} +} diff --git a/less/code.less b/less/code.less index 0cae749a0539..0f8a4221c62f 100644 --- a/less/code.less +++ b/less/code.less @@ -1,3 +1,4 @@ +.su_bootstrap_safe { // Code.less // Code typography styles for the and
 elements
 // --------------------------------------------------------
@@ -54,4 +55,5 @@ pre {
 .pre-scrollable {
   max-height: 340px;
   overflow-y: scroll;
-}
\ No newline at end of file
+}
+}
diff --git a/less/component-animations.less b/less/component-animations.less
index da1f2e535058..575ae2c20c82 100644
--- a/less/component-animations.less
+++ b/less/component-animations.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // COMPONENT ANIMATIONS
 // --------------------
 
@@ -17,4 +18,5 @@
   &.in {
     height: auto;
   }
-}
\ No newline at end of file
+}
+}
diff --git a/less/dropdowns.less b/less/dropdowns.less
index 6c60385e553e..d3520d86ce19 100644
--- a/less/dropdowns.less
+++ b/less/dropdowns.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // DROPDOWN MENUS
 // --------------
 
@@ -141,3 +142,4 @@
   margin-top: 2px; // give it some space to breathe
   .border-radius(4px);
 }
+}
diff --git a/less/forms.less b/less/forms.less
index 7d967c6b3dbb..d927a7663989 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // Forms.less
 // Base styles for various input types, form layouts, and states
 // -------------------------------------------------------------
@@ -582,3 +583,4 @@ legend + .control-group {
     padding-left: 160px;
   }
 }
+}
diff --git a/less/grid.less b/less/grid.less
index e62a960932f5..673ace68e816 100644
--- a/less/grid.less
+++ b/less/grid.less
@@ -1,5 +1,7 @@
+.su_bootstrap_safe {
 // Fixed (940px)
 #grid > .core(@gridColumnWidth, @gridGutterWidth);
 
 // Fluid (940px)
-#grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
\ No newline at end of file
+#grid > .fluid(@fluidGridColumnWidth, @fluidGridGutterWidth);
+}
diff --git a/less/hero-unit.less b/less/hero-unit.less
index 0ffe82962a01..2df3f20e1de8 100644
--- a/less/hero-unit.less
+++ b/less/hero-unit.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // HERO UNIT
 // ---------
 
@@ -20,3 +21,4 @@
     color: @heroUnitLeadColor;
   }
 }
+}
diff --git a/less/layouts.less b/less/layouts.less
index cc53627ff74c..b842e5b728c3 100644
--- a/less/layouts.less
+++ b/less/layouts.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 //
 // Layouts
 // Fixed-width and fluid (with sidebar) layouts
@@ -14,4 +15,5 @@
   padding-right: @gridGutterWidth;
   padding-left: @gridGutterWidth;
   .clearfix();
-}
\ No newline at end of file
+}
+}
diff --git a/less/modals.less b/less/modals.less
index 870ad0dfe677..dc61d8b35f98 100644
--- a/less/modals.less
+++ b/less/modals.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // MODALS
 // ------
 
@@ -88,3 +89,4 @@
     margin-left: -1px;
   }
 }
+}
diff --git a/less/navbar.less b/less/navbar.less
index adfe1096a48f..d08093ddcc7b 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // NAVBAR (FIXED AND STATIC)
 // -------------------------
 
@@ -361,4 +362,5 @@
     left: auto;
     right: 13px;
   }
-}
\ No newline at end of file
+}
+}
diff --git a/less/navs.less b/less/navs.less
index 5cb9f9f3a2e6..e329e47ce5a4 100644
--- a/less/navs.less
+++ b/less/navs.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // NAVIGATIONS
 // -----------
 
@@ -361,3 +362,4 @@
   border-color: #ddd #ddd #ddd transparent;
   *border-left-color: @white;
 }
+}
diff --git a/less/pager.less b/less/pager.less
index 4244b5eb8098..3a24ca02e889 100644
--- a/less/pager.less
+++ b/less/pager.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // PAGER
 // -----
 
@@ -33,4 +34,5 @@
   color: @grayLight;
   background-color: #fff;
   cursor: default;
-}
\ No newline at end of file
+}
+}
diff --git a/less/pagination.less b/less/pagination.less
index 38cf65cc44e2..8845ee5dd555 100644
--- a/less/pagination.less
+++ b/less/pagination.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // PAGINATION
 // ----------
 
@@ -54,3 +55,4 @@
 .pagination-right {
   text-align: right;
 }
+}
diff --git a/less/popovers.less b/less/popovers.less
index 558d99ec9990..d4e4f6aa9d6b 100644
--- a/less/popovers.less
+++ b/less/popovers.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // POPOVERS
 // --------
 
@@ -47,3 +48,4 @@
     margin-bottom: 0;
   }
 }
+}
diff --git a/less/progress-bars.less b/less/progress-bars.less
index 3b47e64828f6..1c9f9b0ecce8 100644
--- a/less/progress-bars.less
+++ b/less/progress-bars.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // PROGRESS BARS
 // -------------
 
@@ -115,3 +116,4 @@
 .progress-warning.progress-striped .bar {
   #gradient > .striped(lighten(@orange, 15%));
 }
+}
diff --git a/less/reset.less b/less/reset.less
index d9ce2b110768..35d3fc1bd869 100644
--- a/less/reset.less
+++ b/less/reset.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // Reset.less
 // Adapted from Normalize.css http://github.com/necolas/normalize.css
 // ------------------------------------------------------------------------
@@ -124,3 +125,4 @@ textarea {
   overflow: auto; // Remove vertical scrollbar in IE6-9
   vertical-align: top; // Readability and alignment cross-browser
 }
+}
diff --git a/less/responsive.less b/less/responsive.less
index bbd76d631052..983d19910035 100644
--- a/less/responsive.less
+++ b/less/responsive.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 /*!
  * Bootstrap Responsive v2.0.3
  *
@@ -46,3 +47,4 @@
 
 // From 979px and below, show a button to toggle navbar contents
 @import "responsive-navbar.less";
+}
diff --git a/less/scaffolding.less b/less/scaffolding.less
index 57c74eda074e..737afbbcce2b 100644
--- a/less/scaffolding.less
+++ b/less/scaffolding.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // Scaffolding
 // Basic and global styles for generating a grid system, structural layout, and page templates
 // -------------------------------------------------------------------------------------------
@@ -27,3 +28,4 @@ a:hover {
   color: @linkColorHover;
   text-decoration: underline;
 }
+}
diff --git a/less/sprites.less b/less/sprites.less
index 72a3a916b65f..5c1b13decc8d 100644
--- a/less/sprites.less
+++ b/less/sprites.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // SPRITES
 // Glyphs and icons for buttons, nav, and more
 // -------------------------------------------
@@ -189,3 +190,4 @@
 
 
 
+}
diff --git a/less/tables.less b/less/tables.less
index b4f6027bf969..863ee331e2f8 100644
--- a/less/tables.less
+++ b/less/tables.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 //
 // Tables.less
 // Tables for, you guessed it, tabular data
@@ -174,3 +175,4 @@ table {
   .span23    { .tableColumns(23); }
   .span24    { .tableColumns(24); }
 }
+}
diff --git a/less/thumbnails.less b/less/thumbnails.less
index aa69f8e33dbb..53c1fc91dc45 100644
--- a/less/thumbnails.less
+++ b/less/thumbnails.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // THUMBNAILS
 // ----------
 // Note: `.thumbnails` and `.thumbnails > li` are overriden in responsive files
@@ -45,3 +46,4 @@ a.thumbnail:hover {
 .thumbnail .caption {
   padding: 9px;
 }
+}
diff --git a/less/tooltip.less b/less/tooltip.less
index 5111a193f039..f31357232f6a 100644
--- a/less/tooltip.less
+++ b/less/tooltip.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // TOOLTIP
 // ------=
 
@@ -33,3 +34,4 @@
   width: 0;
   height: 0;
 }
+}
diff --git a/less/type.less b/less/type.less
index 0d562193406b..1c85c27e0b9b 100644
--- a/less/type.less
+++ b/less/type.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // Typography.less
 // Headings, body text, lists, code, and more for a versatile and durable typography system
 // ----------------------------------------------------------------------------------------
@@ -233,3 +234,4 @@ small {
 cite {
   font-style: normal;
 }
+}
diff --git a/less/utilities.less b/less/utilities.less
index d60d22031199..92b1a72a45fe 100644
--- a/less/utilities.less
+++ b/less/utilities.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // UTILITY CLASSES
 // ---------------
 
@@ -21,3 +22,4 @@
 .invisible {
   visibility: hidden;
 }
+}
diff --git a/less/wells.less b/less/wells.less
index 9300061a5084..7646bb594189 100644
--- a/less/wells.less
+++ b/less/wells.less
@@ -1,3 +1,4 @@
+.su_bootstrap_safe {
 // WELLS
 // -----
 
@@ -25,3 +26,4 @@
   padding: 9px;
   .border-radius(3px);
 }
+}

From 47fe6be83188220c15f71ad39d10cc41c1ff0735 Mon Sep 17 00:00:00 2001
From: Kendall Hopkins 
Date: Thu, 2 Feb 2012 14:42:09 -0500
Subject: [PATCH 02/10] Correctly namespace modals.

---
 js/bootstrap-modal.js          |  3 ++-
 less/component-animations.less |  2 +-
 less/modals.less               | 10 +++++-----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js
index c831de6b64b5..bcc3153ad2ef 100644
--- a/js/bootstrap-modal.js
+++ b/js/bootstrap-modal.js
@@ -30,6 +30,7 @@
     this.options = options
     this.$element = $(content)
       .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+    this.$element.removeClass('su_bootstrap_safe').addClass('su_bootstrap_safe')
   }
 
   Modal.prototype = {
@@ -134,7 +135,7 @@
     if (this.isShown && this.options.backdrop) {
       var doAnimate = $.support.transition && animate
 
-      this.$backdrop = $('