bootstrap-sass 2.3.2.2 → 3.0.0.0.rc

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap-sass might be problematic. Click here for more details.

Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +9 -0
  3. data/.travis.yml +8 -2
  4. data/CHANGELOG.md +4 -0
  5. data/CONTRIBUTING.md +12 -4
  6. data/README.md +87 -74
  7. data/Rakefile +31 -3
  8. data/bootstrap-sass.gemspec +14 -2
  9. data/lib/bootstrap-sass/engine.rb +1 -1
  10. data/lib/bootstrap-sass/version.rb +4 -0
  11. data/tasks/converter.rb +829 -0
  12. data/templates/project/_variables.scss.erb +6 -0
  13. data/templates/project/manifest.rb +8 -13
  14. data/templates/project/styles.scss +1 -6
  15. data/test/compass_test.rb +8 -0
  16. data/test/compilation_test.rb +1 -1
  17. data/test/dummy/README.rdoc +3 -0
  18. data/test/dummy/Rakefile +6 -0
  19. data/test/dummy/app/assets/images/.keep +0 -0
  20. data/test/dummy/app/assets/javascripts/application.js +2 -0
  21. data/test/dummy/app/assets/stylesheets/application.css.sass +1 -0
  22. data/test/dummy/app/controllers/application_controller.rb +5 -0
  23. data/test/dummy/app/controllers/pages_controller.rb +4 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  26. data/test/dummy/app/views/pages/root.html.slim +11 -0
  27. data/test/dummy/bin/bundle +3 -0
  28. data/test/dummy/bin/rails +4 -0
  29. data/test/dummy/bin/rake +4 -0
  30. data/test/dummy/config.ru +4 -0
  31. data/test/dummy/config/application.rb +17 -0
  32. data/test/dummy/config/boot.rb +5 -0
  33. data/test/dummy/config/environment.rb +5 -0
  34. data/test/dummy/config/environments/development.rb +26 -0
  35. data/test/dummy/config/environments/production.rb +76 -0
  36. data/test/dummy/config/environments/test.rb +30 -0
  37. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  38. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  39. data/test/dummy/config/initializers/inflections.rb +16 -0
  40. data/test/dummy/config/initializers/mime_types.rb +5 -0
  41. data/test/dummy/config/initializers/secret_token.rb +18 -0
  42. data/test/dummy/config/initializers/session_store.rb +3 -0
  43. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  44. data/test/dummy/config/locales/en.yml +3 -0
  45. data/test/dummy/config/locales/es.yml +3 -0
  46. data/test/dummy/config/routes.rb +3 -0
  47. data/test/dummy/db/test.sqlite3 +0 -0
  48. data/test/dummy/lib/assets/.keep +0 -0
  49. data/test/dummy/log/.keep +0 -0
  50. data/test/dummy/log/development.log +0 -0
  51. data/test/dummy/public/404.html +58 -0
  52. data/test/dummy/public/422.html +58 -0
  53. data/test/dummy/public/500.html +57 -0
  54. data/test/dummy/public/favicon.ico +0 -0
  55. data/test/gemfiles/sass_3_2.gemfile +1 -1
  56. data/test/gemfiles/sass_3_3.gemfile +6 -0
  57. data/test/pages_test.rb +14 -0
  58. data/test/support/integration_test.rb +29 -0
  59. data/test/test_helper.rb +26 -1
  60. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  61. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +228 -0
  62. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  63. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  64. data/vendor/assets/javascripts/bootstrap.js +12 -13
  65. data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
  66. data/vendor/assets/javascripts/bootstrap/alert.js +98 -0
  67. data/vendor/assets/javascripts/bootstrap/button.js +109 -0
  68. data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
  69. data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
  70. data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
  71. data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
  72. data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
  73. data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
  74. data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
  75. data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
  76. data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
  77. data/vendor/assets/stylesheets/bootstrap/_alerts.scss +46 -58
  78. data/vendor/assets/stylesheets/bootstrap/_badges.scss +51 -0
  79. data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +8 -9
  80. data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +173 -154
  81. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +97 -165
  82. data/vendor/assets/stylesheets/bootstrap/_carousel.scss +116 -65
  83. data/vendor/assets/stylesheets/bootstrap/_close.scss +11 -8
  84. data/vendor/assets/stylesheets/bootstrap/_code.scss +16 -21
  85. data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +10 -3
  86. data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +94 -148
  87. data/vendor/assets/stylesheets/bootstrap/_forms.scss +222 -559
  88. data/vendor/assets/stylesheets/bootstrap/_glyphicons.scss +232 -0
  89. data/vendor/assets/stylesheets/bootstrap/_grid.scss +336 -11
  90. data/vendor/assets/stylesheets/bootstrap/_input-groups.scss +127 -0
  91. data/vendor/assets/stylesheets/bootstrap/_jumbotron.scss +40 -0
  92. data/vendor/assets/stylesheets/bootstrap/_labels.scss +58 -0
  93. data/vendor/assets/stylesheets/bootstrap/_list-group.scss +90 -0
  94. data/vendor/assets/stylesheets/bootstrap/_media.scss +8 -7
  95. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +468 -434
  96. data/vendor/assets/stylesheets/bootstrap/_modals.scss +103 -52
  97. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +511 -383
  98. data/vendor/assets/stylesheets/bootstrap/_navs.scss +169 -349
  99. data/vendor/assets/stylesheets/bootstrap/_normalize.scss +396 -0
  100. data/vendor/assets/stylesheets/bootstrap/_pager.scss +45 -33
  101. data/vendor/assets/stylesheets/bootstrap/_pagination.scss +65 -105
  102. data/vendor/assets/stylesheets/bootstrap/_panels.scss +148 -0
  103. data/vendor/assets/stylesheets/bootstrap/_popovers.scss +51 -51
  104. data/vendor/assets/stylesheets/bootstrap/_print.scss +100 -0
  105. data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +28 -55
  106. data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +180 -45
  107. data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +101 -24
  108. data/vendor/assets/stylesheets/bootstrap/_tables.scss +169 -168
  109. data/vendor/assets/stylesheets/bootstrap/_theme.scss +232 -0
  110. data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +11 -33
  111. data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +45 -20
  112. data/vendor/assets/stylesheets/bootstrap/_type.scss +101 -110
  113. data/vendor/assets/stylesheets/bootstrap/_utilities.scss +19 -22
  114. data/vendor/assets/stylesheets/bootstrap/_variables.scss +498 -179
  115. data/vendor/assets/stylesheets/bootstrap/_wells.scss +7 -7
  116. data/vendor/assets/stylesheets/bootstrap/bootstrap.scss +29 -33
  117. metadata +201 -34
  118. data/asseturl.patch +0 -15
  119. data/templates/project/_variables.scss +0 -301
  120. data/update-bootstrap.sh +0 -25
  121. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  122. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  123. data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
  124. data/vendor/assets/javascripts/bootstrap-alert.js +0 -99
  125. data/vendor/assets/javascripts/bootstrap-button.js +0 -105
  126. data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
  127. data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
  128. data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -169
  129. data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
  130. data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
  131. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
  132. data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
  133. data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
  134. data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
  135. data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
  136. data/vendor/assets/stylesheets/bootstrap-responsive.scss +0 -1
  137. data/vendor/assets/stylesheets/bootstrap/_accordion.scss +0 -34
  138. data/vendor/assets/stylesheets/bootstrap/_hero-unit.scss +0 -25
  139. data/vendor/assets/stylesheets/bootstrap/_labels-badges.scss +0 -83
  140. data/vendor/assets/stylesheets/bootstrap/_layouts.scss +0 -16
  141. data/vendor/assets/stylesheets/bootstrap/_reset.scss +0 -216
  142. data/vendor/assets/stylesheets/bootstrap/_responsive-1200px-min.scss +0 -28
  143. data/vendor/assets/stylesheets/bootstrap/_responsive-767px-max.scss +0 -193
  144. data/vendor/assets/stylesheets/bootstrap/_responsive-768px-979px.scss +0 -19
  145. data/vendor/assets/stylesheets/bootstrap/_responsive-navbar.scss +0 -189
  146. data/vendor/assets/stylesheets/bootstrap/_sprites.scss +0 -197
  147. data/vendor/assets/stylesheets/bootstrap/responsive.scss +0 -48
@@ -0,0 +1,56 @@
1
+ /* ========================================================================
2
+ * Bootstrap: transition.js v3.0.0
3
+ * http://twbs.github.com/bootstrap/javascript.html#transitions
4
+ * ========================================================================
5
+ * Copyright 2013 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ======================================================================== */
19
+
20
+
21
+ +function ($) { "use strict";
22
+
23
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
24
+ // ============================================================
25
+
26
+ function transitionEnd() {
27
+ var el = document.createElement('bootstrap')
28
+
29
+ var transEndEventNames = {
30
+ 'WebkitTransition' : 'webkitTransitionEnd'
31
+ , 'MozTransition' : 'transitionend'
32
+ , 'OTransition' : 'oTransitionEnd otransitionend'
33
+ , 'transition' : 'transitionend'
34
+ }
35
+
36
+ for (var name in transEndEventNames) {
37
+ if (el.style[name] !== undefined) {
38
+ return { end: transEndEventNames[name] }
39
+ }
40
+ }
41
+ }
42
+
43
+ // http://blog.alexmaccaw.com/css-transitions
44
+ $.fn.emulateTransitionEnd = function (duration) {
45
+ var called = false, $el = this
46
+ $(this).one($.support.transition.end, function () { called = true })
47
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
48
+ setTimeout(callback, duration)
49
+ return this
50
+ }
51
+
52
+ $(function () {
53
+ $.support.transition = transitionEnd()
54
+ })
55
+
56
+ }(window.jQuery);
@@ -7,73 +7,61 @@
7
7
  // -------------------------
8
8
 
9
9
  .alert {
10
- padding: 8px 35px 8px 14px;
11
- margin-bottom: $baseLineHeight;
12
- text-shadow: 0 1px 0 rgba(255,255,255,.5);
13
- background-color: $warningBackground;
14
- border: 1px solid $warningBorder;
15
- @include border-radius($baseBorderRadius);
16
- }
17
- .alert,
18
- .alert h4 {
19
- // Specified for the h4 to prevent conflicts of changing $headingsColor
20
- color: $warningText;
21
- }
22
- .alert h4 {
23
- margin: 0;
24
- }
10
+ padding: $alert-padding;
11
+ margin-bottom: $line-height-computed;
12
+ border: 1px solid transparent;
13
+ border-radius: $alert-border-radius;
25
14
 
26
- // Adjust close link position
27
- .alert .close {
28
- position: relative;
29
- top: -2px;
30
- right: -21px;
31
- line-height: $baseLineHeight;
15
+ // Headings for larger alerts
16
+ h4 {
17
+ margin-top: 0;
18
+ // Specified for the h4 to prevent conflicts of changing $headingsColor
19
+ color: inherit;
20
+ }
21
+ // Provide class for links that match alerts
22
+ .alert-link {
23
+ font-weight: $alert-link-font-weight;
24
+ }
25
+
26
+ // Improve alignment and spacing of inner content
27
+ > p,
28
+ > ul {
29
+ margin-bottom: 0;
30
+ }
31
+ > p + p {
32
+ margin-top: 5px;
33
+ }
32
34
  }
33
35
 
36
+ // Dismissable alerts
37
+ //
38
+ // Expand the right padding and account for the close button's positioning.
39
+
40
+ .alert-dismissable {
41
+ padding-right: ($alert-padding + 20);
42
+
43
+ // Adjust close link position
44
+ .close {
45
+ position: relative;
46
+ top: -2px;
47
+ right: -21px;
48
+ color: inherit;
49
+ }
50
+ }
34
51
 
35
52
  // Alternate styles
36
- // -------------------------
53
+ //
54
+ // Generate contextual modifier classes for colorizing the alert.
37
55
 
38
56
  .alert-success {
39
- background-color: $successBackground;
40
- border-color: $successBorder;
41
- color: $successText;
42
- }
43
- .alert-success h4 {
44
- color: $successText;
45
- }
46
- .alert-danger,
47
- .alert-error {
48
- background-color: $errorBackground;
49
- border-color: $errorBorder;
50
- color: $errorText;
51
- }
52
- .alert-danger h4,
53
- .alert-error h4 {
54
- color: $errorText;
57
+ @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
55
58
  }
56
59
  .alert-info {
57
- background-color: $infoBackground;
58
- border-color: $infoBorder;
59
- color: $infoText;
60
- }
61
- .alert-info h4 {
62
- color: $infoText;
63
- }
64
-
65
-
66
- // Block alerts
67
- // -------------------------
68
-
69
- .alert-block {
70
- padding-top: 14px;
71
- padding-bottom: 14px;
60
+ @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
72
61
  }
73
- .alert-block > p,
74
- .alert-block > ul {
75
- margin-bottom: 0;
62
+ .alert-warning {
63
+ @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
76
64
  }
77
- .alert-block p + p {
78
- margin-top: 5px;
65
+ .alert-danger {
66
+ @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
79
67
  }
@@ -0,0 +1,51 @@
1
+ //
2
+ // Badges
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base classes
7
+ .badge {
8
+ display: inline-block;
9
+ min-width: 10px;
10
+ padding: 3px 7px;
11
+ font-size: $font-size-small;
12
+ font-weight: $badge-font-weight;
13
+ color: $badge-color;
14
+ line-height: $badge-line-height;
15
+ vertical-align: baseline;
16
+ white-space: nowrap;
17
+ text-align: center;
18
+ background-color: $badge-bg;
19
+ border-radius: $badge-border-radius;
20
+
21
+ // Empty badges collapse automatically (not available in IE8)
22
+ &:empty {
23
+ display: none;
24
+ }
25
+ }
26
+
27
+ // Hover state, but only for links
28
+ a.badge {
29
+ &:hover,
30
+ &:focus {
31
+ color: $badge-link-hover-color;
32
+ text-decoration: none;
33
+ cursor: pointer;
34
+ }
35
+ }
36
+
37
+ // Quick fix for labels/badges in buttons
38
+ .btn .badge {
39
+ position: relative;
40
+ top: -1px;
41
+ }
42
+
43
+ // Account for counters in navs
44
+ a.list-group-item.active > .badge,
45
+ .nav-pills > .active > a > .badge {
46
+ color: $badge-active-color;
47
+ background-color: $badge-active-bg;
48
+ }
49
+ .nav-pills > li > a > .badge {
50
+ margin-left: 3px;
51
+ }
@@ -5,20 +5,19 @@
5
5
 
6
6
  .breadcrumb {
7
7
  padding: 8px 15px;
8
- margin: 0 0 $baseLineHeight;
8
+ margin-bottom: $line-height-computed;
9
9
  list-style: none;
10
- background-color: #f5f5f5;
11
- @include border-radius($baseBorderRadius);
10
+ background-color: $breadcrumb-bg;
11
+ border-radius: $border-radius-base;
12
12
  > li {
13
13
  display: inline-block;
14
- @include ie7-inline-block();
15
- text-shadow: 0 1px 0 $white;
16
- > .divider {
14
+ &+li:before {
15
+ content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space
17
16
  padding: 0 5px;
18
- color: #ccc;
17
+ color: $breadcrumb-color;
19
18
  }
20
19
  }
21
- .active {
22
- color: $grayLight;
20
+ > .active {
21
+ color: $breadcrumb-active-color;
23
22
  }
24
23
  }
@@ -2,90 +2,119 @@
2
2
  // Button groups
3
3
  // --------------------------------------------------
4
4
 
5
+ // Button carets
6
+ //
7
+ // Match the button text color to the arrow/caret for indicating dropdown-ness.
8
+
9
+ .caret {
10
+ .btn-default & {
11
+ border-top-color: $btn-default-color;
12
+ }
13
+ .btn-primary &,
14
+ .btn-success &,
15
+ .btn-warning &,
16
+ .btn-danger &,
17
+ .btn-info & {
18
+ border-top-color: #fff;
19
+ }
20
+ }
21
+ .dropup {
22
+ & .btn-default .caret {
23
+ border-bottom-color: $btn-default-color;
24
+ }
25
+ .btn-primary,
26
+ .btn-success,
27
+ .btn-warning,
28
+ .btn-danger,
29
+ .btn-info {
30
+ .caret {
31
+ border-bottom-color: #fff;
32
+ }
33
+ }
34
+ }
5
35
 
6
36
  // Make the div behave like a button
7
- .btn-group {
37
+ .btn-group,
38
+ .btn-group-vertical {
8
39
  position: relative;
9
40
  display: inline-block;
10
- @include ie7-inline-block();
11
- font-size: 0; // remove as part 1 of font-size inline-block hack
12
41
  vertical-align: middle; // match .btn alignment given font-size hack above
13
- white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
14
- @include ie7-restore-left-whitespace();
42
+ > .btn {
43
+ position: relative;
44
+ float: left;
45
+ // Bring the "active" button to the front
46
+ &:hover,
47
+ &:focus,
48
+ &:active,
49
+ &.active {
50
+ z-index: 2;
51
+ }
52
+ &:focus {
53
+ // Remove focus outline when dropdown JS adds it after closing the menu
54
+ outline: none;
55
+ }
56
+ }
15
57
  }
16
58
 
17
- // Space out series of button groups
18
- .btn-group + .btn-group {
19
- margin-left: 5px;
59
+ // Prevent double borders when buttons are next to each other
60
+ .btn-group {
61
+ .btn + .btn,
62
+ .btn + .btn-group,
63
+ .btn-group + .btn,
64
+ .btn-group + .btn-group {
65
+ margin-left: -1px;
66
+ }
20
67
  }
21
68
 
22
69
  // Optional: Group multiple button groups together for a toolbar
23
70
  .btn-toolbar {
24
- font-size: 0; // Hack to remove whitespace that results from using inline-block
25
- margin-top: $baseLineHeight / 2;
26
- margin-bottom: $baseLineHeight / 2;
27
- > .btn + .btn,
28
- > .btn-group + .btn,
29
- > .btn + .btn-group {
30
- margin-left: 5px;
31
- }
32
- }
71
+ @include clearfix();
33
72
 
34
- // Float them, remove border radius, then re-add to first and last elements
35
- .btn-group > .btn {
36
- position: relative;
37
- @include border-radius(0);
38
- }
39
- .btn-group > .btn + .btn {
40
- margin-left: -1px;
41
- }
42
- .btn-group > .btn,
43
- .btn-group > .dropdown-menu,
44
- .btn-group > .popover {
45
- font-size: $baseFontSize; // redeclare as part 2 of font-size inline-block hack
73
+ .btn-group {
74
+ float: left;
75
+ }
76
+ // Space out series of button groups
77
+ > .btn,
78
+ > .btn-group {
79
+ + .btn,
80
+ + .btn-group {
81
+ margin-left: 5px;
82
+ }
83
+ }
46
84
  }
47
85
 
48
- // Reset fonts for other sizes
49
- .btn-group > .btn-mini {
50
- font-size: $fontSizeMini;
51
- }
52
- .btn-group > .btn-small {
53
- font-size: $fontSizeSmall;
54
- }
55
- .btn-group > .btn-large {
56
- font-size: $fontSizeLarge;
86
+ .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
87
+ border-radius: 0;
57
88
  }
58
89
 
59
90
  // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
60
91
  .btn-group > .btn:first-child {
61
92
  margin-left: 0;
62
- @include border-top-left-radius($baseBorderRadius);
63
- @include border-bottom-left-radius($baseBorderRadius);
93
+ &:not(:last-child):not(.dropdown-toggle) {
94
+ @include border-right-radius(0);
95
+ }
64
96
  }
65
97
  // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
66
- .btn-group > .btn:last-child,
67
- .btn-group > .dropdown-toggle {
68
- @include border-top-right-radius($baseBorderRadius);
69
- @include border-bottom-right-radius($baseBorderRadius);
98
+ .btn-group > .btn:last-child:not(:first-child),
99
+ .btn-group > .dropdown-toggle:not(:first-child) {
100
+ @include border-left-radius(0);
70
101
  }
71
- // Reset corners for large buttons
72
- .btn-group > .btn.large:first-child {
73
- margin-left: 0;
74
- @include border-top-left-radius($borderRadiusLarge);
75
- @include border-bottom-left-radius($borderRadiusLarge);
102
+
103
+ // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
104
+ .btn-group > .btn-group {
105
+ float: left;
76
106
  }
77
- .btn-group > .btn.large:last-child,
78
- .btn-group > .large.dropdown-toggle {
79
- @include border-top-right-radius($borderRadiusLarge);
80
- @include border-bottom-right-radius($borderRadiusLarge);
107
+ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
108
+ border-radius: 0;
81
109
  }
82
-
83
- // On hover/focus/active, bring the proper btn to front
84
- .btn-group > .btn:hover,
85
- .btn-group > .btn:focus,
86
- .btn-group > .btn:active,
87
- .btn-group > .btn.active {
88
- z-index: 2;
110
+ .btn-group > .btn-group:first-child {
111
+ > .btn:last-child,
112
+ > .dropdown-toggle {
113
+ @include border-right-radius(0);
114
+ }
115
+ }
116
+ .btn-group > .btn-group:last-child > .btn:first-child {
117
+ @include border-left-radius(0);
89
118
  }
90
119
 
91
120
  // On active and open, don't show outline
@@ -95,6 +124,14 @@
95
124
  }
96
125
 
97
126
 
127
+ // Sizing
128
+ //
129
+ // Remix the default button sizing classes into new ones for easier manipulation.
130
+
131
+ .btn-group-xs > .btn { @extend .btn-xs; }
132
+ .btn-group-sm > .btn { @extend .btn-sm; }
133
+ .btn-group-lg > .btn { @extend .btn-lg; }
134
+
98
135
 
99
136
  // Split button dropdowns
100
137
  // ----------------------
@@ -103,127 +140,109 @@
103
140
  .btn-group > .btn + .dropdown-toggle {
104
141
  padding-left: 8px;
105
142
  padding-right: 8px;
106
- @include box-shadow(inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05));
107
- *padding-top: 5px;
108
- *padding-bottom: 5px;
109
- }
110
- .btn-group > .btn-mini + .dropdown-toggle {
111
- padding-left: 5px;
112
- padding-right: 5px;
113
- *padding-top: 2px;
114
- *padding-bottom: 2px;
115
143
  }
116
- .btn-group > .btn-small + .dropdown-toggle {
117
- *padding-top: 5px;
118
- *padding-bottom: 4px;
119
- }
120
- .btn-group > .btn-large + .dropdown-toggle {
144
+ .btn-group > .btn-lg + .dropdown-toggle {
121
145
  padding-left: 12px;
122
146
  padding-right: 12px;
123
- *padding-top: 7px;
124
- *padding-bottom: 7px;
125
147
  }
126
148
 
127
- .btn-group.open {
128
-
129
- // The clickable button for toggling the menu
130
- // Remove the gradient and set the same inset shadow as the :active state
131
- .dropdown-toggle {
132
- background-image: none;
133
- @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05));
134
- }
135
-
136
- // Keep the hover's background when dropdown is open
137
- .btn.dropdown-toggle {
138
- background-color: $btnBackgroundHighlight;
139
- }
140
- .btn-primary.dropdown-toggle {
141
- background-color: $btnPrimaryBackgroundHighlight;
142
- }
143
- .btn-warning.dropdown-toggle {
144
- background-color: $btnWarningBackgroundHighlight;
145
- }
146
- .btn-danger.dropdown-toggle {
147
- background-color: $btnDangerBackgroundHighlight;
148
- }
149
- .btn-success.dropdown-toggle {
150
- background-color: $btnSuccessBackgroundHighlight;
151
- }
152
- .btn-info.dropdown-toggle {
153
- background-color: $btnInfoBackgroundHighlight;
154
- }
155
- .btn-inverse.dropdown-toggle {
156
- background-color: $btnInverseBackgroundHighlight;
157
- }
149
+ // The clickable button for toggling the menu
150
+ // Remove the gradient and set the same inset shadow as the :active state
151
+ .btn-group.open .dropdown-toggle {
152
+ @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
158
153
  }
159
154
 
160
155
 
161
156
  // Reposition the caret
162
157
  .btn .caret {
163
- margin-top: 8px;
164
158
  margin-left: 0;
165
159
  }
166
160
  // Carets in other button sizes
167
- .btn-large .caret {
168
- margin-top: 6px;
169
- }
170
- .btn-large .caret {
171
- border-left-width: 5px;
172
- border-right-width: 5px;
173
- border-top-width: 5px;
174
- }
175
- .btn-mini .caret,
176
- .btn-small .caret {
177
- margin-top: 8px;
161
+ .btn-lg .caret {
162
+ border-width: $caret-width-large $caret-width-large 0;
163
+ border-bottom-width: 0;
178
164
  }
179
165
  // Upside down carets for .dropup
180
- .dropup .btn-large .caret {
181
- border-bottom-width: 5px;
166
+ .dropup .btn-lg .caret {
167
+ border-width: 0 $caret-width-large $caret-width-large;
182
168
  }
183
169
 
184
170
 
185
-
186
- // Account for other colors
187
- .btn-primary,
188
- .btn-warning,
189
- .btn-danger,
190
- .btn-info,
191
- .btn-success,
192
- .btn-inverse {
193
- .caret {
194
- border-top-color: $white;
195
- border-bottom-color: $white;
196
- }
197
- }
198
-
199
-
200
-
201
171
  // Vertical button groups
202
172
  // ----------------------
203
173
 
204
174
  .btn-group-vertical {
205
- display: inline-block; // makes buttons only take up the width they need
206
- @include ie7-inline-block();
175
+ > .btn,
176
+ > .btn-group {
177
+ display: block;
178
+ float: none;
179
+ width: 100%;
180
+ max-width: 100%;
181
+ }
182
+
183
+ // Clear floats so dropdown menus can be properly placed
184
+ > .btn-group {
185
+ @include clearfix();
186
+ > .btn {
187
+ float: none;
188
+ }
189
+ }
190
+
191
+ > .btn + .btn,
192
+ > .btn + .btn-group,
193
+ > .btn-group + .btn,
194
+ > .btn-group + .btn-group {
195
+ margin-top: -1px;
196
+ margin-left: 0;
197
+ }
207
198
  }
199
+
208
200
  .btn-group-vertical > .btn {
209
- display: block;
210
- float: none;
211
- max-width: 100%;
212
- @include border-radius(0);
201
+ &:not(:first-child):not(:last-child) {
202
+ border-radius: 0;
203
+ }
204
+ &:first-child:not(:last-child) {
205
+ border-top-right-radius: $border-radius-base;
206
+ @include border-bottom-radius(0);
207
+ }
208
+ &:last-child:not(:first-child) {
209
+ border-bottom-left-radius: $border-radius-base;
210
+ @include border-top-radius(0);
211
+ }
213
212
  }
214
- .btn-group-vertical > .btn + .btn {
215
- margin-left: 0;
216
- margin-top: -1px;
213
+ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
214
+ border-radius: 0;
217
215
  }
218
- .btn-group-vertical > .btn:first-child {
219
- @include border-radius($baseBorderRadius $baseBorderRadius 0 0);
216
+ .btn-group-vertical > .btn-group:first-child {
217
+ > .btn:last-child,
218
+ > .dropdown-toggle {
219
+ @include border-bottom-radius(0);
220
+ }
220
221
  }
221
- .btn-group-vertical > .btn:last-child {
222
- @include border-radius(0 0 $baseBorderRadius $baseBorderRadius);
222
+ .btn-group-vertical > .btn-group:last-child > .btn:first-child {
223
+ @include border-top-radius(0);
223
224
  }
224
- .btn-group-vertical > .btn-large:first-child {
225
- @include border-radius($borderRadiusLarge $borderRadiusLarge 0 0);
225
+
226
+
227
+
228
+ // Justified button groups
229
+ // ----------------------
230
+
231
+ .btn-group-justified {
232
+ display: table;
233
+ width: 100%;
234
+ table-layout: fixed;
235
+ border-collapse: separate;
236
+ .btn {
237
+ float: none;
238
+ display: table-cell;
239
+ width: 1%;
240
+ }
226
241
  }
227
- .btn-group-vertical > .btn-large:last-child {
228
- @include border-radius(0 0 $borderRadiusLarge $borderRadiusLarge);
242
+
243
+
244
+ // Checkbox and radio options
245
+ [data-toggle="buttons"] > .btn > input[type="radio"],
246
+ [data-toggle="buttons"] > .btn > input[type="checkbox"] {
247
+ display: none;
229
248
  }