bootstrap-sass-backport 3.2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.travis.yml +19 -0
  4. data/CHANGELOG.md +146 -0
  5. data/CONTRIBUTING.md +79 -0
  6. data/Gemfile +10 -0
  7. data/LICENSE +21 -0
  8. data/README.md +320 -0
  9. data/Rakefile +54 -0
  10. data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  11. data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +229 -0
  12. data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  13. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  14. data/assets/images/.keep +0 -0
  15. data/assets/javascripts/bootstrap-sprockets.js +12 -0
  16. data/assets/javascripts/bootstrap.js +2107 -0
  17. data/assets/javascripts/bootstrap/affix.js +142 -0
  18. data/assets/javascripts/bootstrap/alert.js +92 -0
  19. data/assets/javascripts/bootstrap/button.js +110 -0
  20. data/assets/javascripts/bootstrap/carousel.js +223 -0
  21. data/assets/javascripts/bootstrap/collapse.js +170 -0
  22. data/assets/javascripts/bootstrap/dropdown.js +151 -0
  23. data/assets/javascripts/bootstrap/modal.js +280 -0
  24. data/assets/javascripts/bootstrap/popover.js +113 -0
  25. data/assets/javascripts/bootstrap/scrollspy.js +170 -0
  26. data/assets/javascripts/bootstrap/tab.js +128 -0
  27. data/assets/javascripts/bootstrap/tooltip.js +457 -0
  28. data/assets/javascripts/bootstrap/transition.js +59 -0
  29. data/assets/stylesheets/_bootstrap-compass.scss +7 -0
  30. data/assets/stylesheets/_bootstrap-mincer.scss +17 -0
  31. data/assets/stylesheets/_bootstrap-sprockets.scss +7 -0
  32. data/assets/stylesheets/_bootstrap.scss +50 -0
  33. data/assets/stylesheets/bootstrap/_alerts.scss +68 -0
  34. data/assets/stylesheets/bootstrap/_badges.scss +57 -0
  35. data/assets/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
  36. data/assets/stylesheets/bootstrap/_button-groups.scss +240 -0
  37. data/assets/stylesheets/bootstrap/_buttons.scss +157 -0
  38. data/assets/stylesheets/bootstrap/_carousel.scss +243 -0
  39. data/assets/stylesheets/bootstrap/_close.scss +35 -0
  40. data/assets/stylesheets/bootstrap/_code.scss +68 -0
  41. data/assets/stylesheets/bootstrap/_component-animations.scss +35 -0
  42. data/assets/stylesheets/bootstrap/_dropdowns.scss +215 -0
  43. data/assets/stylesheets/bootstrap/_forms.scss +538 -0
  44. data/assets/stylesheets/bootstrap/_glyphicons.scss +237 -0
  45. data/assets/stylesheets/bootstrap/_grid.scss +84 -0
  46. data/assets/stylesheets/bootstrap/_input-groups.scss +166 -0
  47. data/assets/stylesheets/bootstrap/_jumbotron.scss +48 -0
  48. data/assets/stylesheets/bootstrap/_labels.scss +66 -0
  49. data/assets/stylesheets/bootstrap/_list-group.scss +131 -0
  50. data/assets/stylesheets/bootstrap/_media.scss +56 -0
  51. data/assets/stylesheets/bootstrap/_mixins.scss +39 -0
  52. data/assets/stylesheets/bootstrap/_modals.scss +150 -0
  53. data/assets/stylesheets/bootstrap/_navbar.scss +659 -0
  54. data/assets/stylesheets/bootstrap/_navs.scss +242 -0
  55. data/assets/stylesheets/bootstrap/_normalize.scss +425 -0
  56. data/assets/stylesheets/bootstrap/_pager.scss +55 -0
  57. data/assets/stylesheets/bootstrap/_pagination.scss +88 -0
  58. data/assets/stylesheets/bootstrap/_panels.scss +243 -0
  59. data/assets/stylesheets/bootstrap/_popovers.scss +133 -0
  60. data/assets/stylesheets/bootstrap/_print.scss +101 -0
  61. data/assets/stylesheets/bootstrap/_progress-bars.scss +105 -0
  62. data/assets/stylesheets/bootstrap/_responsive-embed.scss +34 -0
  63. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +174 -0
  64. data/assets/stylesheets/bootstrap/_scaffolding.scss +150 -0
  65. data/assets/stylesheets/bootstrap/_tables.scss +233 -0
  66. data/assets/stylesheets/bootstrap/_theme.scss +258 -0
  67. data/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
  68. data/assets/stylesheets/bootstrap/_tooltip.scss +95 -0
  69. data/assets/stylesheets/bootstrap/_type.scss +304 -0
  70. data/assets/stylesheets/bootstrap/_utilities.scss +57 -0
  71. data/assets/stylesheets/bootstrap/_variables.scss +854 -0
  72. data/assets/stylesheets/bootstrap/_wells.scss +29 -0
  73. data/assets/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
  74. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +11 -0
  75. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  76. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +50 -0
  77. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  78. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  79. data/assets/stylesheets/bootstrap/mixins/_forms.scss +84 -0
  80. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
  81. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  82. data/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  83. data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  84. data/assets/stylesheets/bootstrap/mixins/_image.scss +34 -0
  85. data/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  86. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +31 -0
  87. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  88. data/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  89. data/assets/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
  90. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +23 -0
  91. data/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  92. data/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  93. data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  94. data/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  95. data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
  96. data/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  97. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  98. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  99. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +11 -0
  100. data/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  101. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +219 -0
  102. data/bootstrap-sass-backport.gemspec +36 -0
  103. data/bower.json +50 -0
  104. data/composer.json +35 -0
  105. data/lib/bootstrap-sass-backport.rb +71 -0
  106. data/lib/bootstrap-sass/engine.rb +12 -0
  107. data/lib/bootstrap-sass/version.rb +4 -0
  108. data/package.json +30 -0
  109. data/sache.json +5 -0
  110. data/tasks/bower.rake +34 -0
  111. data/tasks/converter.rb +80 -0
  112. data/tasks/converter/char_string_scanner.rb +38 -0
  113. data/tasks/converter/fonts_conversion.rb +16 -0
  114. data/tasks/converter/js_conversion.rb +45 -0
  115. data/tasks/converter/less_conversion.rb +670 -0
  116. data/tasks/converter/logger.rb +57 -0
  117. data/tasks/converter/network.rb +86 -0
  118. data/templates/project/_bootstrap-variables.sass.erb +4 -0
  119. data/templates/project/manifest.rb +26 -0
  120. data/templates/project/styles.sass +3 -0
  121. data/test/compass_test.rb +9 -0
  122. data/test/compilation_test.rb +18 -0
  123. data/test/dummy_node_mincer/apple-touch-icon-144-precomposed.png +0 -0
  124. data/test/dummy_node_mincer/application.css.ejs.scss +6 -0
  125. data/test/dummy_node_mincer/manifest.js +87 -0
  126. data/test/dummy_rails/README.rdoc +3 -0
  127. data/test/dummy_rails/Rakefile +6 -0
  128. data/test/dummy_rails/app/assets/images/.keep +0 -0
  129. data/test/dummy_rails/app/assets/javascripts/application.js +2 -0
  130. data/test/dummy_rails/app/assets/stylesheets/application.css.sass +2 -0
  131. data/test/dummy_rails/app/controllers/application_controller.rb +5 -0
  132. data/test/dummy_rails/app/controllers/pages_controller.rb +4 -0
  133. data/test/dummy_rails/app/helpers/application_helper.rb +2 -0
  134. data/test/dummy_rails/app/views/layouts/application.html.erb +14 -0
  135. data/test/dummy_rails/app/views/pages/root.html.slim +41 -0
  136. data/test/dummy_rails/bin/bundle +3 -0
  137. data/test/dummy_rails/bin/rails +4 -0
  138. data/test/dummy_rails/bin/rake +4 -0
  139. data/test/dummy_rails/config.ru +4 -0
  140. data/test/dummy_rails/config/application.rb +30 -0
  141. data/test/dummy_rails/config/boot.rb +5 -0
  142. data/test/dummy_rails/config/environment.rb +5 -0
  143. data/test/dummy_rails/config/environments/development.rb +26 -0
  144. data/test/dummy_rails/config/environments/production.rb +76 -0
  145. data/test/dummy_rails/config/environments/test.rb +30 -0
  146. data/test/dummy_rails/config/initializers/backtrace_silencers.rb +7 -0
  147. data/test/dummy_rails/config/initializers/filter_parameter_logging.rb +4 -0
  148. data/test/dummy_rails/config/initializers/inflections.rb +16 -0
  149. data/test/dummy_rails/config/initializers/mime_types.rb +5 -0
  150. data/test/dummy_rails/config/initializers/secret_token.rb +18 -0
  151. data/test/dummy_rails/config/initializers/session_store.rb +3 -0
  152. data/test/dummy_rails/config/initializers/wrap_parameters.rb +14 -0
  153. data/test/dummy_rails/config/locales/en.yml +3 -0
  154. data/test/dummy_rails/config/locales/es.yml +3 -0
  155. data/test/dummy_rails/config/routes.rb +3 -0
  156. data/test/dummy_rails/db/test.sqlite3 +0 -0
  157. data/test/dummy_rails/lib/assets/.keep +0 -0
  158. data/test/dummy_rails/log/.keep +0 -0
  159. data/test/dummy_rails/public/404.html +58 -0
  160. data/test/dummy_rails/public/422.html +58 -0
  161. data/test/dummy_rails/public/500.html +57 -0
  162. data/test/dummy_rails/public/favicon.ico +0 -0
  163. data/test/dummy_sass_only/Gemfile +4 -0
  164. data/test/dummy_sass_only/compile.rb +13 -0
  165. data/test/dummy_sass_only/import_all.sass +2 -0
  166. data/test/gemfiles/sass_3_2.gemfile +6 -0
  167. data/test/gemfiles/sass_3_3.gemfile +6 -0
  168. data/test/gemfiles/sass_3_4.gemfile +7 -0
  169. data/test/gemfiles/sass_head.gemfile +6 -0
  170. data/test/node_mincer_test.rb +36 -0
  171. data/test/node_sass_test.rb +16 -0
  172. data/test/pages_test.rb +14 -0
  173. data/test/sass_test.rb +26 -0
  174. data/test/sprockets_rails_test.rb +27 -0
  175. data/test/support/dummy_rails_integration.rb +22 -0
  176. data/test/support/integration_test.rb +22 -0
  177. data/test/support/reporting.rb +17 -0
  178. data/test/test_helper.rb +35 -0
  179. data/test/test_helper_rails.rb +6 -0
  180. metadata +484 -0
@@ -0,0 +1,59 @@
1
+ /* ========================================================================
2
+ * Bootstrap: transition.js v3.2.0
3
+ * http://getbootstrap.com/javascript/#transitions
4
+ * ========================================================================
5
+ * Copyright 2011-2014 Twitter, Inc.
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * ======================================================================== */
8
+
9
+
10
+ +function ($) {
11
+ 'use strict';
12
+
13
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
14
+ // ============================================================
15
+
16
+ function transitionEnd() {
17
+ var el = document.createElement('bootstrap')
18
+
19
+ var transEndEventNames = {
20
+ WebkitTransition : 'webkitTransitionEnd',
21
+ MozTransition : 'transitionend',
22
+ OTransition : 'oTransitionEnd otransitionend',
23
+ transition : 'transitionend'
24
+ }
25
+
26
+ for (var name in transEndEventNames) {
27
+ if (el.style[name] !== undefined) {
28
+ return { end: transEndEventNames[name] }
29
+ }
30
+ }
31
+
32
+ return false // explicit for ie8 ( ._.)
33
+ }
34
+
35
+ // http://blog.alexmaccaw.com/css-transitions
36
+ $.fn.emulateTransitionEnd = function (duration) {
37
+ var called = false
38
+ var $el = this
39
+ $(this).one('bsTransitionEnd', function () { called = true })
40
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
41
+ setTimeout(callback, duration)
42
+ return this
43
+ }
44
+
45
+ $(function () {
46
+ $.support.transition = transitionEnd()
47
+
48
+ if (!$.support.transition) return
49
+
50
+ $.event.special.bsTransitionEnd = {
51
+ bindType: $.support.transition.end,
52
+ delegateType: $.support.transition.end,
53
+ handle: function (e) {
54
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
55
+ }
56
+ }
57
+ })
58
+
59
+ }(jQuery);
@@ -0,0 +1,7 @@
1
+ @function twbs-font-path($path) {
2
+ @return font-url($path, true);
3
+ }
4
+
5
+ @function twbs-image-path($path) {
6
+ @return image-url($path, true);
7
+ }
@@ -0,0 +1,17 @@
1
+ // Mincer asset helper functions
2
+ //
3
+ // This must be imported into a .css.ejs.scss file.
4
+ // Then, <% %>-interpolations will be parsed as strings by Sass, and evaluated by EJS after Sass compilation.
5
+
6
+
7
+ @function twbs-font-path($path) {
8
+ // do something like following
9
+ // from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
10
+ // from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
11
+ // or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
12
+ @return "<%- asset_path('#{$path}'.replace(/[#?].*$/, '')) + '#{$path}'.replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
13
+ }
14
+
15
+ @function twbs-image-path($file) {
16
+ @return "<%- asset_path('#{$file}') %>";
17
+ }
@@ -0,0 +1,7 @@
1
+ @function twbs-font-path($path) {
2
+ @return font-path($path);
3
+ }
4
+
5
+ @function twbs-image-path($path) {
6
+ @return image-path($path);
7
+ }
@@ -0,0 +1,50 @@
1
+ // Core variables and mixins
2
+ @import "bootstrap/variables";
3
+ @import "bootstrap/mixins";
4
+
5
+ // Reset and dependencies
6
+ @import "bootstrap/normalize";
7
+ @import "bootstrap/print";
8
+ @import "bootstrap/glyphicons";
9
+
10
+ // Core CSS
11
+ @import "bootstrap/scaffolding";
12
+ @import "bootstrap/type";
13
+ @import "bootstrap/code";
14
+ @import "bootstrap/grid";
15
+ @import "bootstrap/tables";
16
+ @import "bootstrap/forms";
17
+ @import "bootstrap/buttons";
18
+
19
+ // Components
20
+ @import "bootstrap/component-animations";
21
+ @import "bootstrap/dropdowns";
22
+ @import "bootstrap/button-groups";
23
+ @import "bootstrap/input-groups";
24
+ @import "bootstrap/navs";
25
+ @import "bootstrap/navbar";
26
+ @import "bootstrap/breadcrumbs";
27
+ @import "bootstrap/pagination";
28
+ @import "bootstrap/pager";
29
+ @import "bootstrap/labels";
30
+ @import "bootstrap/badges";
31
+ @import "bootstrap/jumbotron";
32
+ @import "bootstrap/thumbnails";
33
+ @import "bootstrap/alerts";
34
+ @import "bootstrap/progress-bars";
35
+ @import "bootstrap/media";
36
+ @import "bootstrap/list-group";
37
+ @import "bootstrap/panels";
38
+ @import "bootstrap/responsive-embed";
39
+ @import "bootstrap/wells";
40
+ @import "bootstrap/close";
41
+
42
+ // Components w/ JavaScript
43
+ @import "bootstrap/modals";
44
+ @import "bootstrap/tooltip";
45
+ @import "bootstrap/popovers";
46
+ @import "bootstrap/carousel";
47
+
48
+ // Utility classes
49
+ @import "bootstrap/utilities";
50
+ @import "bootstrap/responsive-utilities";
@@ -0,0 +1,68 @@
1
+ //
2
+ // Alerts
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base styles
7
+ // -------------------------
8
+
9
+ .alert {
10
+ padding: $alert-padding;
11
+ margin-bottom: $line-height-computed;
12
+ border: 1px solid transparent;
13
+ border-radius: $alert-border-radius;
14
+
15
+ // Headings for larger alerts
16
+ h4 {
17
+ margin-top: 0;
18
+ // Specified for the h4 to prevent conflicts of changing $headings-color
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
+ }
34
+ }
35
+
36
+ // Dismissible alerts
37
+ //
38
+ // Expand the right padding and account for the close button's positioning.
39
+
40
+ .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
41
+ .alert-dismissible {
42
+ padding-right: ($alert-padding + 20);
43
+
44
+ // Adjust close link position
45
+ .close {
46
+ position: relative;
47
+ top: -2px;
48
+ right: -21px;
49
+ color: inherit;
50
+ }
51
+ }
52
+
53
+ // Alternate styles
54
+ //
55
+ // Generate contextual modifier classes for colorizing the alert.
56
+
57
+ .alert-success {
58
+ @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
59
+ }
60
+ .alert-info {
61
+ @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
62
+ }
63
+ .alert-warning {
64
+ @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
65
+ }
66
+ .alert-danger {
67
+ @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
68
+ }
@@ -0,0 +1,57 @@
1
+ //
2
+ // Badges
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base class
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
+ // Quick fix for badges in buttons
27
+ .btn & {
28
+ position: relative;
29
+ top: -1px;
30
+ }
31
+ .btn-xs & {
32
+ top: 0;
33
+ padding: 1px 5px;
34
+ }
35
+
36
+ // [converter] extracted a& to a.badge
37
+
38
+ // Account for badges in navs
39
+ a.list-group-item.active > &,
40
+ .nav-pills > .active > a > & {
41
+ color: $badge-active-color;
42
+ background-color: $badge-active-bg;
43
+ }
44
+ .nav-pills > li > a > & {
45
+ margin-left: 3px;
46
+ }
47
+ }
48
+
49
+ // Hover state, but only for links
50
+ a.badge {
51
+ &:hover,
52
+ &:focus {
53
+ color: $badge-link-hover-color;
54
+ text-decoration: none;
55
+ cursor: pointer;
56
+ }
57
+ }
@@ -0,0 +1,26 @@
1
+ //
2
+ // Breadcrumbs
3
+ // --------------------------------------------------
4
+
5
+
6
+ .breadcrumb {
7
+ padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal;
8
+ margin-bottom: $line-height-computed;
9
+ list-style: none;
10
+ background-color: $breadcrumb-bg;
11
+ border-radius: $border-radius-base;
12
+
13
+ > li {
14
+ display: inline-block;
15
+
16
+ + li:before {
17
+ content: "#{$breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
18
+ padding: 0 5px;
19
+ color: $breadcrumb-color;
20
+ }
21
+ }
22
+
23
+ > .active {
24
+ color: $breadcrumb-active-color;
25
+ }
26
+ }
@@ -0,0 +1,240 @@
1
+ //
2
+ // Button groups
3
+ // --------------------------------------------------
4
+
5
+ // Make the div behave like a button
6
+ .btn-group,
7
+ .btn-group-vertical {
8
+ position: relative;
9
+ display: inline-block;
10
+ vertical-align: middle; // match .btn alignment given font-size hack above
11
+ > .btn {
12
+ position: relative;
13
+ float: left;
14
+ // Bring the "active" button to the front
15
+ &:hover,
16
+ &:focus,
17
+ &:active,
18
+ &.active {
19
+ z-index: 2;
20
+ }
21
+ &:focus {
22
+ // Remove focus outline when dropdown JS adds it after closing the menu
23
+ outline: 0;
24
+ }
25
+ }
26
+ }
27
+
28
+ // Prevent double borders when buttons are next to each other
29
+ .btn-group {
30
+ .btn + .btn,
31
+ .btn + .btn-group,
32
+ .btn-group + .btn,
33
+ .btn-group + .btn-group {
34
+ margin-left: -1px;
35
+ }
36
+ }
37
+
38
+ // Optional: Group multiple button groups together for a toolbar
39
+ .btn-toolbar {
40
+ margin-left: -5px; // Offset the first child's margin
41
+ @include clearfix();
42
+
43
+ .btn-group,
44
+ .input-group {
45
+ float: left;
46
+ }
47
+ > .btn,
48
+ > .btn-group,
49
+ > .input-group {
50
+ margin-left: 5px;
51
+ }
52
+ }
53
+
54
+ .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
55
+ border-radius: 0;
56
+ }
57
+
58
+ // 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
59
+ .btn-group > .btn:first-child {
60
+ margin-left: 0;
61
+ &:not(:last-child):not(.dropdown-toggle) {
62
+ @include border-right-radius(0);
63
+ }
64
+ }
65
+ // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
66
+ .btn-group > .btn:last-child:not(:first-child),
67
+ .btn-group > .dropdown-toggle:not(:first-child) {
68
+ @include border-left-radius(0);
69
+ }
70
+
71
+ // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
72
+ .btn-group > .btn-group {
73
+ float: left;
74
+ }
75
+ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
76
+ border-radius: 0;
77
+ }
78
+ .btn-group > .btn-group:first-child {
79
+ > .btn:last-child,
80
+ > .dropdown-toggle {
81
+ @include border-right-radius(0);
82
+ }
83
+ }
84
+ .btn-group > .btn-group:last-child > .btn:first-child {
85
+ @include border-left-radius(0);
86
+ }
87
+
88
+ // On active and open, don't show outline
89
+ .btn-group .dropdown-toggle:active,
90
+ .btn-group.open .dropdown-toggle {
91
+ outline: 0;
92
+ }
93
+
94
+
95
+ // Sizing
96
+ //
97
+ // Remix the default button sizing classes into new ones for easier manipulation.
98
+
99
+ .btn-group-xs > .btn { @extend .btn-xs; }
100
+ .btn-group-sm > .btn { @extend .btn-sm; }
101
+ .btn-group-lg > .btn { @extend .btn-lg; }
102
+
103
+
104
+ // Split button dropdowns
105
+ // ----------------------
106
+
107
+ // Give the line between buttons some depth
108
+ .btn-group > .btn + .dropdown-toggle {
109
+ padding-left: 8px;
110
+ padding-right: 8px;
111
+ }
112
+ .btn-group > .btn-lg + .dropdown-toggle {
113
+ padding-left: 12px;
114
+ padding-right: 12px;
115
+ }
116
+
117
+ // The clickable button for toggling the menu
118
+ // Remove the gradient and set the same inset shadow as the :active state
119
+ .btn-group.open .dropdown-toggle {
120
+ @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
121
+
122
+ // Show no shadow for `.btn-link` since it has no other button styles.
123
+ &.btn-link {
124
+ @include box-shadow(none);
125
+ }
126
+ }
127
+
128
+
129
+ // Reposition the caret
130
+ .btn .caret {
131
+ margin-left: 0;
132
+ }
133
+ // Carets in other button sizes
134
+ .btn-lg .caret {
135
+ border-width: $caret-width-large $caret-width-large 0;
136
+ border-bottom-width: 0;
137
+ }
138
+ // Upside down carets for .dropup
139
+ .dropup .btn-lg .caret {
140
+ border-width: 0 $caret-width-large $caret-width-large;
141
+ }
142
+
143
+
144
+ // Vertical button groups
145
+ // ----------------------
146
+
147
+ .btn-group-vertical {
148
+ > .btn,
149
+ > .btn-group,
150
+ > .btn-group > .btn {
151
+ display: block;
152
+ float: none;
153
+ width: 100%;
154
+ max-width: 100%;
155
+ }
156
+
157
+ // Clear floats so dropdown menus can be properly placed
158
+ > .btn-group {
159
+ @include clearfix();
160
+ > .btn {
161
+ float: none;
162
+ }
163
+ }
164
+
165
+ > .btn + .btn,
166
+ > .btn + .btn-group,
167
+ > .btn-group + .btn,
168
+ > .btn-group + .btn-group {
169
+ margin-top: -1px;
170
+ margin-left: 0;
171
+ }
172
+ }
173
+
174
+ .btn-group-vertical > .btn {
175
+ &:not(:first-child):not(:last-child) {
176
+ border-radius: 0;
177
+ }
178
+ &:first-child:not(:last-child) {
179
+ border-top-right-radius: $border-radius-base;
180
+ @include border-bottom-radius(0);
181
+ }
182
+ &:last-child:not(:first-child) {
183
+ border-bottom-left-radius: $border-radius-base;
184
+ @include border-top-radius(0);
185
+ }
186
+ }
187
+ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
188
+ border-radius: 0;
189
+ }
190
+ .btn-group-vertical > .btn-group:first-child:not(:last-child) {
191
+ > .btn:last-child,
192
+ > .dropdown-toggle {
193
+ @include border-bottom-radius(0);
194
+ }
195
+ }
196
+ .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
197
+ @include border-top-radius(0);
198
+ }
199
+
200
+
201
+
202
+ // Justified button groups
203
+ // ----------------------
204
+
205
+ .btn-group-justified {
206
+ display: table;
207
+ width: 100%;
208
+ table-layout: fixed;
209
+ border-collapse: separate;
210
+ > .btn,
211
+ > .btn-group {
212
+ float: none;
213
+ display: table-cell;
214
+ width: 1%;
215
+ }
216
+ > .btn-group .btn {
217
+ width: 100%;
218
+ }
219
+
220
+ > .btn-group .dropdown-menu {
221
+ left: auto;
222
+ }
223
+ }
224
+
225
+
226
+ // Checkbox and radio options
227
+ //
228
+ // In order to support the browser's form validation feedback, powered by the
229
+ // `required` attribute, we have to "hide" the inputs via `opacity`. We cannot
230
+ // use `display: none;` or `visibility: hidden;` as that also hides the popover.
231
+ // This way, we ensure a DOM element is visible to position the popover from.
232
+ //
233
+ // See https://github.com/twbs/bootstrap/pull/12794 for more.
234
+
235
+ [data-toggle="buttons"] > .btn > input[type="radio"],
236
+ [data-toggle="buttons"] > .btn > input[type="checkbox"] {
237
+ position: absolute;
238
+ z-index: -1;
239
+ @include opacity(0);
240
+ }