twitter-bootstrap-rails 2.2.3 → 3.2.2

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

Potentially problematic release.


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

Files changed (204) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +460 -185
  3. data/Rakefile +7 -1
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +640 -0
  6. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  7. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  8. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  9. data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  10. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  11. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  12. data/app/assets/javascripts/twitter/bootstrap.js +12 -0
  13. data/app/assets/javascripts/twitter/bootstrap/affix.js +142 -0
  14. data/app/assets/javascripts/twitter/bootstrap/alert.js +92 -0
  15. data/app/assets/javascripts/twitter/bootstrap/button.js +110 -0
  16. data/app/assets/javascripts/twitter/bootstrap/carousel.js +223 -0
  17. data/app/assets/javascripts/twitter/bootstrap/collapse.js +170 -0
  18. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +151 -0
  19. data/app/assets/javascripts/twitter/bootstrap/modal.js +280 -0
  20. data/app/assets/javascripts/twitter/bootstrap/popover.js +113 -0
  21. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +170 -0
  22. data/app/assets/javascripts/twitter/bootstrap/tab.js +128 -0
  23. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +457 -0
  24. data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
  25. data/{vendor → app}/assets/javascripts/twitter/bootstrap_ujs.js +0 -0
  26. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -0
  27. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +2026 -0
  28. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -0
  29. data/app/helpers/badge_label_helper.rb +16 -0
  30. data/app/helpers/bootstrap_flash_helper.rb +20 -6
  31. data/app/helpers/form_errors_helper.rb +22 -0
  32. data/app/helpers/glyph_helper.rb +13 -5
  33. data/app/helpers/modal_helper.rb +37 -20
  34. data/app/helpers/navbar_helper.rb +209 -0
  35. data/app/helpers/twitter_breadcrumbs_helper.rb +11 -2
  36. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +9 -9
  37. data/lib/generators/bootstrap/install/install_generator.rb +13 -8
  38. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +2 -3
  39. data/lib/generators/bootstrap/install/templates/bootstrap.js +2 -3
  40. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +14 -13
  41. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +11 -5
  42. data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
  43. data/lib/generators/bootstrap/layout/templates/layout.html.erb +34 -58
  44. data/lib/generators/bootstrap/layout/templates/layout.html.haml +25 -44
  45. data/lib/generators/bootstrap/layout/templates/layout.html.slim +20 -39
  46. data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
  47. data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
  48. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
  49. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
  50. data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -2
  51. data/lib/generators/bootstrap/themed/templates/edit.html.haml +1 -1
  52. data/lib/generators/bootstrap/themed/templates/edit.html.slim +2 -2
  53. data/lib/generators/bootstrap/themed/templates/index.html.erb +3 -3
  54. data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -3
  55. data/lib/generators/bootstrap/themed/templates/index.html.slim +5 -6
  56. data/lib/generators/bootstrap/themed/templates/new.html.erb +1 -2
  57. data/lib/generators/bootstrap/themed/templates/new.html.haml +1 -1
  58. data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -2
  59. data/lib/generators/bootstrap/themed/templates/show.html.erb +6 -8
  60. data/lib/generators/bootstrap/themed/templates/show.html.haml +5 -5
  61. data/lib/generators/bootstrap/themed/templates/show.html.slim +7 -8
  62. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  63. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
  64. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  65. data/lib/generators/bootstrap/themed/themed_generator.rb +4 -4
  66. data/lib/twitter-bootstrap-rails.rb +4 -4
  67. data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
  68. data/lib/twitter/bootstrap/rails/engine.rb +17 -7
  69. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  70. data/spec/lib/breadcrumbs_spec.rb +99 -0
  71. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +30 -0
  72. data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
  73. data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
  74. data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
  75. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +62 -0
  76. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +396 -0
  77. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +49 -0
  78. data/spec/spec_helper.rb +21 -0
  79. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5990 -195
  80. data/vendor/static-source/bootstrap.less +0 -1
  81. data/vendor/static-source/fontawesome.less +7 -6
  82. data/vendor/static-source/sprites.less +3 -3
  83. data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
  84. data/vendor/toolkit/fontawesome/core.less +11 -0
  85. data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
  86. data/vendor/toolkit/fontawesome/font-awesome.less +17 -0
  87. data/vendor/toolkit/fontawesome/icons.less +552 -0
  88. data/vendor/toolkit/fontawesome/larger.less +13 -0
  89. data/vendor/toolkit/fontawesome/list.less +19 -0
  90. data/vendor/toolkit/fontawesome/mixins.less +25 -0
  91. data/vendor/toolkit/fontawesome/path.less +14 -0
  92. data/vendor/toolkit/fontawesome/rotated-flipped.less +20 -0
  93. data/vendor/toolkit/fontawesome/spinning.less +29 -0
  94. data/vendor/toolkit/fontawesome/stacked.less +20 -0
  95. data/vendor/toolkit/fontawesome/variables.less +561 -0
  96. data/vendor/toolkit/twitter/bootstrap/alerts.less +47 -58
  97. data/vendor/toolkit/twitter/bootstrap/badges.less +55 -0
  98. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +26 -39
  99. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
  100. data/vendor/toolkit/twitter/bootstrap/button-groups.less +168 -152
  101. data/vendor/toolkit/twitter/bootstrap/buttons.less +101 -170
  102. data/vendor/toolkit/twitter/bootstrap/carousel.less +150 -65
  103. data/vendor/toolkit/twitter/bootstrap/close.less +20 -19
  104. data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
  105. data/vendor/toolkit/twitter/bootstrap/component-animations.less +12 -3
  106. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +124 -146
  107. data/vendor/toolkit/twitter/bootstrap/forms.less +401 -547
  108. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +234 -0
  109. data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
  110. data/vendor/toolkit/twitter/bootstrap/input-groups.less +166 -0
  111. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +48 -0
  112. data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
  113. data/vendor/toolkit/twitter/bootstrap/list-group.less +132 -0
  114. data/vendor/toolkit/twitter/bootstrap/media.less +8 -7
  115. data/vendor/toolkit/twitter/bootstrap/mixins.less +36 -699
  116. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  117. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
  118. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  119. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +52 -0
  120. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  121. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  122. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
  123. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  124. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  125. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  126. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  127. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
  128. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  129. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
  130. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  131. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  132. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  133. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
  134. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  135. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  136. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  137. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  138. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  139. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  140. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  141. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  142. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
  143. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  144. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
  145. data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
  146. data/vendor/toolkit/twitter/bootstrap/navbar.less +542 -384
  147. data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
  148. data/vendor/toolkit/twitter/bootstrap/normalize.less +425 -0
  149. data/vendor/toolkit/twitter/bootstrap/pager.less +46 -34
  150. data/vendor/toolkit/twitter/bootstrap/pagination.less +70 -105
  151. data/vendor/toolkit/twitter/bootstrap/panels.less +248 -0
  152. data/vendor/toolkit/twitter/bootstrap/popovers.less +61 -61
  153. data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
  154. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +51 -73
  155. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
  156. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
  157. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +120 -23
  158. data/vendor/toolkit/twitter/bootstrap/tables.less +171 -182
  159. data/vendor/toolkit/twitter/bootstrap/theme.less +260 -0
  160. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +26 -43
  161. data/vendor/toolkit/twitter/bootstrap/tooltip.less +49 -24
  162. data/vendor/toolkit/twitter/bootstrap/type.less +208 -147
  163. data/vendor/toolkit/twitter/bootstrap/utilities.less +33 -7
  164. data/vendor/toolkit/twitter/bootstrap/variables.less +761 -215
  165. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
  166. metadata +199 -92
  167. data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +0 -13
  168. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
  169. data/test/lib/breadcrumbs_test.rb +0 -75
  170. data/test/test_helper.rb +0 -8
  171. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  172. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  173. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  174. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  175. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  176. data/vendor/assets/javascripts/twitter/bootstrap.js +0 -13
  177. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
  178. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
  179. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
  180. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
  181. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
  182. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -165
  183. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
  184. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
  185. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
  186. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
  187. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -353
  188. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
  189. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
  190. data/vendor/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -531
  191. data/vendor/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +0 -146
  192. data/vendor/toolkit/fontawesome-ie7.less +0 -350
  193. data/vendor/toolkit/fontawesome.less +0 -532
  194. data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
  195. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
  196. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
  197. data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
  198. data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
  199. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
  200. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
  201. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
  202. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
  203. data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
  204. data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -7,73 +7,62 @@
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
- .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 @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
+ }
32
34
  }
33
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
+ }
34
52
 
35
53
  // Alternate styles
36
- // -------------------------
54
+ //
55
+ // Generate contextual modifier classes for colorizing the alert.
37
56
 
38
57
  .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;
58
+ .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
55
59
  }
56
60
  .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;
61
+ .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
72
62
  }
73
- .alert-block > p,
74
- .alert-block > ul {
75
- margin-bottom: 0;
63
+ .alert-warning {
64
+ .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
76
65
  }
77
- .alert-block p + p {
78
- margin-top: 5px;
66
+ .alert-danger {
67
+ .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
79
68
  }
@@ -0,0 +1,55 @@
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
+ // Hover state, but only for links
37
+ a& {
38
+ &:hover,
39
+ &:focus {
40
+ color: @badge-link-hover-color;
41
+ text-decoration: none;
42
+ cursor: pointer;
43
+ }
44
+ }
45
+
46
+ // Account for badges in navs
47
+ a.list-group-item.active > &,
48
+ .nav-pills > .active > a > & {
49
+ color: @badge-active-color;
50
+ background-color: @badge-active-bg;
51
+ }
52
+ .nav-pills > li > a > & {
53
+ margin-left: 3px;
54
+ }
55
+ }
@@ -1,62 +1,49 @@
1
- /*!
2
- * Bootstrap v2.3.0
3
- *
4
- * Copyright 2012 Twitter, Inc
5
- * Licensed under the Apache License v2.0
6
- * http://www.apache.org/licenses/LICENSE-2.0
7
- *
8
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
- */
10
-
11
1
  // Core variables and mixins
12
- @import "variables.less"; // Modify this for custom colors, font-sizes, etc
2
+ @import "variables.less";
13
3
  @import "mixins.less";
14
4
 
15
- // CSS Reset
16
- @import "reset.less";
5
+ // Reset and dependencies
6
+ @import "normalize.less";
7
+ @import "print.less";
17
8
 
18
- // Grid system and page structure
9
+ // Core CSS
19
10
  @import "scaffolding.less";
20
- @import "grid.less";
21
- @import "layouts.less";
22
-
23
- // Base CSS
24
11
  @import "type.less";
25
12
  @import "code.less";
26
- @import "forms.less";
13
+ @import "grid.less";
27
14
  @import "tables.less";
15
+ @import "forms.less";
16
+ @import "buttons.less";
28
17
 
29
- // Components: common
30
- @import "dropdowns.less";
31
- @import "wells.less";
18
+ // Components
32
19
  @import "component-animations.less";
33
- @import "close.less";
34
-
35
- // Components: Buttons & Alerts
36
- @import "buttons.less";
20
+ @import "dropdowns.less";
37
21
  @import "button-groups.less";
38
- @import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
39
-
40
- // Components: Nav
22
+ @import "input-groups.less";
41
23
  @import "navs.less";
42
24
  @import "navbar.less";
43
25
  @import "breadcrumbs.less";
44
26
  @import "pagination.less";
45
27
  @import "pager.less";
28
+ @import "labels.less";
29
+ @import "badges.less";
30
+ @import "jumbotron.less";
31
+ @import "thumbnails.less";
32
+ @import "alerts.less";
33
+ @import "progress-bars.less";
34
+ @import "media.less";
35
+ @import "list-group.less";
36
+ @import "panels.less";
37
+ @import "responsive-embed.less";
38
+ @import "wells.less";
39
+ @import "close.less";
46
40
 
47
- // Components: Popovers
41
+ // Components w/ JavaScript
48
42
  @import "modals.less";
49
43
  @import "tooltip.less";
50
44
  @import "popovers.less";
51
-
52
- // Components: Misc
53
- @import "thumbnails.less";
54
- @import "media.less";
55
- @import "labels-badges.less";
56
- @import "progress-bars.less";
57
- @import "accordion.less";
58
45
  @import "carousel.less";
59
- @import "hero-unit.less";
60
46
 
61
47
  // Utility classes
62
- @import "utilities.less"; // Has to be last to override when necessary
48
+ @import "utilities.less";
49
+ @import "responsive-utilities.less";
@@ -4,21 +4,23 @@
4
4
 
5
5
 
6
6
  .breadcrumb {
7
- padding: 8px 15px;
8
- margin: 0 0 @baseLineHeight;
7
+ padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
8
+ margin-bottom: @line-height-computed;
9
9
  list-style: none;
10
- background-color: #f5f5f5;
11
- .border-radius(@baseBorderRadius);
10
+ background-color: @breadcrumb-bg;
11
+ border-radius: @border-radius-base;
12
+
12
13
  > li {
13
14
  display: inline-block;
14
- .ie7-inline-block();
15
- text-shadow: 0 1px 0 @white;
16
- > .divider {
15
+
16
+ + li:before {
17
+ content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
17
18
  padding: 0 5px;
18
- color: #ccc;
19
+ color: @breadcrumb-color;
19
20
  }
20
21
  }
22
+
21
23
  > .active {
22
- color: @grayLight;
24
+ color: @breadcrumb-active-color;
23
25
  }
24
26
  }
@@ -2,90 +2,87 @@
2
2
  // Button groups
3
3
  // --------------------------------------------------
4
4
 
5
-
6
5
  // Make the div behave like a button
7
- .btn-group {
6
+ .btn-group,
7
+ .btn-group-vertical {
8
8
  position: relative;
9
9
  display: inline-block;
10
- .ie7-inline-block();
11
- font-size: 0; // remove as part 1 of font-size inline-block hack
12
10
  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
- .ie7-restore-left-whitespace();
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
+ }
15
26
  }
16
27
 
17
- // Space out series of button groups
18
- .btn-group + .btn-group {
19
- margin-left: 5px;
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
+ }
20
36
  }
21
37
 
22
38
  // Optional: Group multiple button groups together for a toolbar
23
39
  .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 {
40
+ margin-left: -5px; // Offset the first child's margin
41
+ &:extend(.clearfix all);
42
+
43
+ .btn-group,
44
+ .input-group {
45
+ float: left;
46
+ }
47
+ > .btn,
48
+ > .btn-group,
49
+ > .input-group {
30
50
  margin-left: 5px;
31
51
  }
32
52
  }
33
53
 
34
- // Float them, remove border radius, then re-add to first and last elements
35
- .btn-group > .btn {
36
- position: relative;
37
- .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
46
- }
47
-
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;
54
+ .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
55
+ border-radius: 0;
57
56
  }
58
57
 
59
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
60
59
  .btn-group > .btn:first-child {
61
60
  margin-left: 0;
62
- .border-top-left-radius(@baseBorderRadius);
63
- .border-bottom-left-radius(@baseBorderRadius);
61
+ &:not(:last-child):not(.dropdown-toggle) {
62
+ .border-right-radius(0);
63
+ }
64
64
  }
65
65
  // 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
- .border-top-right-radius(@baseBorderRadius);
69
- .border-bottom-right-radius(@baseBorderRadius);
66
+ .btn-group > .btn:last-child:not(:first-child),
67
+ .btn-group > .dropdown-toggle:not(:first-child) {
68
+ .border-left-radius(0);
70
69
  }
71
- // Reset corners for large buttons
72
- .btn-group > .btn.large:first-child {
73
- margin-left: 0;
74
- .border-top-left-radius(@borderRadiusLarge);
75
- .border-bottom-left-radius(@borderRadiusLarge);
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;
76
74
  }
77
- .btn-group > .btn.large:last-child,
78
- .btn-group > .large.dropdown-toggle {
79
- .border-top-right-radius(@borderRadiusLarge);
80
- .border-bottom-right-radius(@borderRadiusLarge);
75
+ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
76
+ border-radius: 0;
81
77
  }
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;
78
+ .btn-group > .btn-group:first-child {
79
+ > .btn:last-child,
80
+ > .dropdown-toggle {
81
+ .border-right-radius(0);
82
+ }
83
+ }
84
+ .btn-group > .btn-group:last-child > .btn:first-child {
85
+ .border-left-radius(0);
89
86
  }
90
87
 
91
88
  // On active and open, don't show outline
@@ -95,6 +92,14 @@
95
92
  }
96
93
 
97
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
+
98
103
 
99
104
  // Split button dropdowns
100
105
  // ----------------------
@@ -103,127 +108,138 @@
103
108
  .btn-group > .btn + .dropdown-toggle {
104
109
  padding-left: 8px;
105
110
  padding-right: 8px;
106
- .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
111
  }
116
- .btn-group > .btn-small + .dropdown-toggle {
117
- *padding-top: 5px;
118
- *padding-bottom: 4px;
119
- }
120
- .btn-group > .btn-large + .dropdown-toggle {
112
+ .btn-group > .btn-lg + .dropdown-toggle {
121
113
  padding-left: 12px;
122
114
  padding-right: 12px;
123
- *padding-top: 7px;
124
- *padding-bottom: 7px;
125
115
  }
126
116
 
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
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
134
- }
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
+ .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
135
121
 
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;
122
+ // Show no shadow for `.btn-link` since it has no other button styles.
123
+ &.btn-link {
124
+ .box-shadow(none);
157
125
  }
158
126
  }
159
127
 
160
128
 
161
129
  // Reposition the caret
162
130
  .btn .caret {
163
- margin-top: 8px;
164
131
  margin-left: 0;
165
132
  }
166
133
  // 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;
134
+ .btn-lg .caret {
135
+ border-width: @caret-width-large @caret-width-large 0;
136
+ border-bottom-width: 0;
178
137
  }
179
138
  // Upside down carets for .dropup
180
- .dropup .btn-large .caret {
181
- border-bottom-width: 5px;
139
+ .dropup .btn-lg .caret {
140
+ border-width: 0 @caret-width-large @caret-width-large;
182
141
  }
183
142
 
184
143
 
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
144
  // Vertical button groups
202
145
  // ----------------------
203
146
 
204
147
  .btn-group-vertical {
205
- display: inline-block; // makes buttons only take up the width they need
206
- .ie7-inline-block();
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
+ &:extend(.clearfix all);
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
+ }
207
172
  }
173
+
208
174
  .btn-group-vertical > .btn {
209
- display: block;
210
- float: none;
211
- max-width: 100%;
212
- .border-radius(0);
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
+ .border-bottom-radius(0);
181
+ }
182
+ &:last-child:not(:first-child) {
183
+ border-bottom-left-radius: @border-radius-base;
184
+ .border-top-radius(0);
185
+ }
213
186
  }
214
- .btn-group-vertical > .btn + .btn {
215
- margin-left: 0;
216
- margin-top: -1px;
187
+ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
188
+ border-radius: 0;
217
189
  }
218
- .btn-group-vertical > .btn:first-child {
219
- .border-radius(@baseBorderRadius @baseBorderRadius 0 0);
190
+ .btn-group-vertical > .btn-group:first-child:not(:last-child) {
191
+ > .btn:last-child,
192
+ > .dropdown-toggle {
193
+ .border-bottom-radius(0);
194
+ }
220
195
  }
221
- .btn-group-vertical > .btn:last-child {
222
- .border-radius(0 0 @baseBorderRadius @baseBorderRadius);
196
+ .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
197
+ .border-top-radius(0);
223
198
  }
224
- .btn-group-vertical > .btn-large:first-child {
225
- .border-radius(@borderRadiusLarge @borderRadiusLarge 0 0);
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
+ }
226
223
  }
227
- .btn-group-vertical > .btn-large:last-child {
228
- .border-radius(0 0 @borderRadiusLarge @borderRadiusLarge);
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"] {
236
+ > .btn,
237
+ > .btn-group > .btn {
238
+ input[type="radio"],
239
+ input[type="checkbox"] {
240
+ position: absolute;
241
+ z-index: -1;
242
+ .opacity(0);
243
+ }
244
+ }
229
245
  }