twitter-bootstrap-rails 2.2.8 → 4.0.0

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 (185) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +229 -322
  3. data/Rakefile +4 -6
  4. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  5. data/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  6. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  7. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  8. data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  9. data/app/assets/javascripts/twitter/bootstrap.js +12 -13
  10. data/app/assets/javascripts/twitter/bootstrap/affix.js +162 -0
  11. data/app/assets/javascripts/twitter/bootstrap/alert.js +94 -0
  12. data/app/assets/javascripts/twitter/bootstrap/button.js +120 -0
  13. data/app/assets/javascripts/twitter/bootstrap/carousel.js +237 -0
  14. data/app/assets/javascripts/twitter/bootstrap/collapse.js +211 -0
  15. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +165 -0
  16. data/app/assets/javascripts/twitter/bootstrap/modal.js +337 -0
  17. data/app/assets/javascripts/twitter/bootstrap/popover.js +108 -0
  18. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +172 -0
  19. data/app/assets/javascripts/twitter/bootstrap/tab.js +155 -0
  20. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +514 -0
  21. data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
  22. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
  23. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
  24. data/app/helpers/bootstrap_flash_helper.rb +14 -7
  25. data/app/helpers/form_errors_helper.rb +22 -0
  26. data/app/helpers/glyph_helper.rb +12 -6
  27. data/app/helpers/modal_helper.rb +26 -22
  28. data/app/helpers/navbar_helper.rb +47 -32
  29. data/app/helpers/twitter_breadcrumbs_helper.rb +6 -2
  30. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +8 -8
  31. data/lib/generators/bootstrap/install/install_generator.rb +3 -2
  32. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +3 -4
  33. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +9 -18
  34. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
  35. data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
  36. data/lib/generators/bootstrap/layout/templates/layout.html.erb +27 -48
  37. data/lib/generators/bootstrap/layout/templates/layout.html.haml +19 -34
  38. data/lib/generators/bootstrap/layout/templates/layout.html.slim +13 -30
  39. data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
  40. data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
  41. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
  42. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
  43. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  44. data/lib/generators/bootstrap/themed/templates/index.html.erb +4 -2
  45. data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -2
  46. data/lib/generators/bootstrap/themed/templates/index.html.slim +6 -5
  47. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  48. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
  49. data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
  50. data/lib/generators/bootstrap/themed/templates/show.html.slim +6 -7
  51. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  52. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
  53. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  54. data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
  55. data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
  56. data/lib/twitter/bootstrap/rails/engine.rb +17 -10
  57. data/lib/twitter/bootstrap/rails/version.rb +2 -2
  58. data/spec/lib/breadcrumbs_spec.rb +99 -0
  59. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +12 -4
  60. data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
  61. data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
  62. data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
  63. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
  64. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +207 -173
  65. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
  66. data/spec/spec_helper.rb +11 -1
  67. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5796 -1
  68. data/vendor/static-source/bootstrap.less +0 -1
  69. data/vendor/static-source/sprites.less +1 -1
  70. data/vendor/toolkit/twitter/bootstrap/alerts.less +51 -57
  71. data/vendor/toolkit/twitter/bootstrap/badges.less +66 -0
  72. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +29 -36
  73. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
  74. data/vendor/toolkit/twitter/bootstrap/button-groups.less +167 -152
  75. data/vendor/toolkit/twitter/bootstrap/buttons.less +107 -169
  76. data/vendor/toolkit/twitter/bootstrap/carousel.less +177 -65
  77. data/vendor/toolkit/twitter/bootstrap/close.less +21 -19
  78. data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
  79. data/vendor/toolkit/twitter/bootstrap/component-animations.less +15 -4
  80. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +120 -152
  81. data/vendor/toolkit/twitter/bootstrap/forms.less +470 -547
  82. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +305 -0
  83. data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
  84. data/vendor/toolkit/twitter/bootstrap/input-groups.less +171 -0
  85. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +54 -0
  86. data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
  87. data/vendor/toolkit/twitter/bootstrap/list-group.less +130 -0
  88. data/vendor/toolkit/twitter/bootstrap/media.less +40 -29
  89. data/vendor/toolkit/twitter/bootstrap/mixins.less +37 -699
  90. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  91. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +9 -0
  92. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  93. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +65 -0
  94. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  95. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  96. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
  97. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  98. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  99. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  100. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  101. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
  102. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  103. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +30 -0
  104. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  105. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  106. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  107. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +24 -0
  108. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  109. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  110. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins/reset-text.less +18 -0
  112. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  113. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  114. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  115. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  116. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  117. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +9 -0
  118. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  119. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +227 -0
  120. data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
  121. data/vendor/toolkit/twitter/bootstrap/navbar.less +547 -384
  122. data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
  123. data/vendor/toolkit/twitter/bootstrap/normalize.less +424 -0
  124. data/vendor/toolkit/twitter/bootstrap/pager.less +45 -34
  125. data/vendor/toolkit/twitter/bootstrap/pagination.less +71 -105
  126. data/vendor/toolkit/twitter/bootstrap/panels.less +271 -0
  127. data/vendor/toolkit/twitter/bootstrap/popovers.less +66 -68
  128. data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
  129. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +40 -75
  130. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +35 -0
  131. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
  132. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +131 -23
  133. data/vendor/toolkit/twitter/bootstrap/tables.less +172 -182
  134. data/vendor/toolkit/twitter/bootstrap/theme.less +291 -0
  135. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +27 -44
  136. data/vendor/toolkit/twitter/bootstrap/tooltip.less +58 -27
  137. data/vendor/toolkit/twitter/bootstrap/type.less +209 -154
  138. data/vendor/toolkit/twitter/bootstrap/utilities.less +32 -7
  139. data/vendor/toolkit/twitter/bootstrap/variables.less +784 -216
  140. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
  141. metadata +156 -141
  142. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  143. data/app/assets/fonts/fontawesome-webfont.svg +0 -399
  144. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  145. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  146. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  147. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  148. data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
  149. data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
  150. data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
  151. data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
  152. data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
  153. data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
  154. data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
  155. data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
  156. data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
  157. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
  158. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
  159. data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
  160. data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
  161. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -787
  162. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
  163. data/test/lib/breadcrumbs_test.rb +0 -75
  164. data/test/test_helper.rb +0 -11
  165. data/vendor/static-source/fontawesome.less +0 -9
  166. data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
  167. data/vendor/toolkit/fontawesome/core.less +0 -129
  168. data/vendor/toolkit/fontawesome/extras.less +0 -93
  169. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
  170. data/vendor/toolkit/fontawesome/font-awesome.less +0 -33
  171. data/vendor/toolkit/fontawesome/icons.less +0 -381
  172. data/vendor/toolkit/fontawesome/mixins.less +0 -48
  173. data/vendor/toolkit/fontawesome/path.less +0 -14
  174. data/vendor/toolkit/fontawesome/variables.less +0 -735
  175. data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
  176. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
  177. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
  178. data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
  179. data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
  180. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
  181. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
  182. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
  183. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
  184. data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
  185. data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -1,123 +1,89 @@
1
1
  //
2
2
  // Pagination (multiple pages)
3
3
  // --------------------------------------------------
4
-
5
- // Space out pagination from surrounding content
6
4
  .pagination {
7
- margin: @baseLineHeight 0;
8
- }
9
-
10
- .pagination ul {
11
- // Allow for text-based alignment
12
5
  display: inline-block;
13
- .ie7-inline-block();
14
- // Reset default ul styles
15
- margin-left: 0;
16
- margin-bottom: 0;
17
- // Visuals
18
- .border-radius(@baseBorderRadius);
19
- .box-shadow(0 1px 2px rgba(0,0,0,.05));
20
- }
21
- .pagination ul > li {
22
- display: inline; // Remove list-style and block-level defaults
23
- }
24
- .pagination ul > li > a,
25
- .pagination ul > li > span {
26
- float: left; // Collapse white-space
27
- padding: 4px 12px;
28
- line-height: @baseLineHeight;
29
- text-decoration: none;
30
- background-color: @paginationBackground;
31
- border: 1px solid @paginationBorder;
32
- border-left-width: 0;
33
- }
34
- .pagination ul > li > a:hover,
35
- .pagination ul > li > a:focus,
36
- .pagination ul > .active > a,
37
- .pagination ul > .active > span {
38
- background-color: @paginationActiveBackground;
39
- }
40
- .pagination ul > .active > a,
41
- .pagination ul > .active > span {
42
- color: @grayLight;
43
- cursor: default;
44
- }
45
- .pagination ul > .disabled > span,
46
- .pagination ul > .disabled > a,
47
- .pagination ul > .disabled > a:hover,
48
- .pagination ul > .disabled > a:focus {
49
- color: @grayLight;
50
- background-color: transparent;
51
- cursor: default;
52
- }
53
- .pagination ul > li:first-child > a,
54
- .pagination ul > li:first-child > span {
55
- border-left-width: 1px;
56
- .border-left-radius(@baseBorderRadius);
57
- }
58
- .pagination ul > li:last-child > a,
59
- .pagination ul > li:last-child > span {
60
- .border-right-radius(@baseBorderRadius);
61
- }
6
+ padding-left: 0;
7
+ margin: @line-height-computed 0;
8
+ border-radius: @border-radius-base;
62
9
 
10
+ > li {
11
+ display: inline; // Remove list-style and block-level defaults
12
+ > a,
13
+ > span {
14
+ position: relative;
15
+ float: left; // Collapse white-space
16
+ padding: @padding-base-vertical @padding-base-horizontal;
17
+ line-height: @line-height-base;
18
+ text-decoration: none;
19
+ color: @pagination-color;
20
+ background-color: @pagination-bg;
21
+ border: 1px solid @pagination-border;
22
+ margin-left: -1px;
23
+ }
24
+ &:first-child {
25
+ > a,
26
+ > span {
27
+ margin-left: 0;
28
+ .border-left-radius(@border-radius-base);
29
+ }
30
+ }
31
+ &:last-child {
32
+ > a,
33
+ > span {
34
+ .border-right-radius(@border-radius-base);
35
+ }
36
+ }
37
+ }
63
38
 
64
- // Alignment
65
- // --------------------------------------------------
39
+ > li > a,
40
+ > li > span {
41
+ &:hover,
42
+ &:focus {
43
+ z-index: 2;
44
+ color: @pagination-hover-color;
45
+ background-color: @pagination-hover-bg;
46
+ border-color: @pagination-hover-border;
47
+ }
48
+ }
66
49
 
67
- .pagination-centered {
68
- text-align: center;
69
- }
70
- .pagination-right {
71
- text-align: right;
72
- }
50
+ > .active > a,
51
+ > .active > span {
52
+ &,
53
+ &:hover,
54
+ &:focus {
55
+ z-index: 3;
56
+ color: @pagination-active-color;
57
+ background-color: @pagination-active-bg;
58
+ border-color: @pagination-active-border;
59
+ cursor: default;
60
+ }
61
+ }
73
62
 
63
+ > .disabled {
64
+ > span,
65
+ > span:hover,
66
+ > span:focus,
67
+ > a,
68
+ > a:hover,
69
+ > a:focus {
70
+ color: @pagination-disabled-color;
71
+ background-color: @pagination-disabled-bg;
72
+ border-color: @pagination-disabled-border;
73
+ cursor: @cursor-disabled;
74
+ }
75
+ }
76
+ }
74
77
 
75
78
  // Sizing
76
79
  // --------------------------------------------------
77
80
 
78
81
  // Large
79
- .pagination-large {
80
- ul > li > a,
81
- ul > li > span {
82
- padding: @paddingLarge;
83
- font-size: @fontSizeLarge;
84
- }
85
- ul > li:first-child > a,
86
- ul > li:first-child > span {
87
- .border-left-radius(@borderRadiusLarge);
88
- }
89
- ul > li:last-child > a,
90
- ul > li:last-child > span {
91
- .border-right-radius(@borderRadiusLarge);
92
- }
93
- }
94
-
95
- // Small and mini
96
- .pagination-mini,
97
- .pagination-small {
98
- ul > li:first-child > a,
99
- ul > li:first-child > span {
100
- .border-left-radius(@borderRadiusSmall);
101
- }
102
- ul > li:last-child > a,
103
- ul > li:last-child > span {
104
- .border-right-radius(@borderRadiusSmall);
105
- }
82
+ .pagination-lg {
83
+ .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
106
84
  }
107
85
 
108
86
  // Small
109
- .pagination-small {
110
- ul > li > a,
111
- ul > li > span {
112
- padding: @paddingSmall;
113
- font-size: @fontSizeSmall;
114
- }
115
- }
116
- // Mini
117
- .pagination-mini {
118
- ul > li > a,
119
- ul > li > span {
120
- padding: @paddingMini;
121
- font-size: @fontSizeMini;
122
- }
87
+ .pagination-sm {
88
+ .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
123
89
  }
@@ -0,0 +1,271 @@
1
+ //
2
+ // Panels
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base class
7
+ .panel {
8
+ margin-bottom: @line-height-computed;
9
+ background-color: @panel-bg;
10
+ border: 1px solid transparent;
11
+ border-radius: @panel-border-radius;
12
+ .box-shadow(0 1px 1px rgba(0,0,0,.05));
13
+ }
14
+
15
+ // Panel contents
16
+ .panel-body {
17
+ padding: @panel-body-padding;
18
+ &:extend(.clearfix all);
19
+ }
20
+
21
+ // Optional heading
22
+ .panel-heading {
23
+ padding: @panel-heading-padding;
24
+ border-bottom: 1px solid transparent;
25
+ .border-top-radius((@panel-border-radius - 1));
26
+
27
+ > .dropdown .dropdown-toggle {
28
+ color: inherit;
29
+ }
30
+ }
31
+
32
+ // Within heading, strip any `h*` tag of its default margins for spacing.
33
+ .panel-title {
34
+ margin-top: 0;
35
+ margin-bottom: 0;
36
+ font-size: ceil((@font-size-base * 1.125));
37
+ color: inherit;
38
+
39
+ > a,
40
+ > small,
41
+ > .small,
42
+ > small > a,
43
+ > .small > a {
44
+ color: inherit;
45
+ }
46
+ }
47
+
48
+ // Optional footer (stays gray in every modifier class)
49
+ .panel-footer {
50
+ padding: @panel-footer-padding;
51
+ background-color: @panel-footer-bg;
52
+ border-top: 1px solid @panel-inner-border;
53
+ .border-bottom-radius((@panel-border-radius - 1));
54
+ }
55
+
56
+
57
+ // List groups in panels
58
+ //
59
+ // By default, space out list group content from panel headings to account for
60
+ // any kind of custom content between the two.
61
+
62
+ .panel {
63
+ > .list-group,
64
+ > .panel-collapse > .list-group {
65
+ margin-bottom: 0;
66
+
67
+ .list-group-item {
68
+ border-width: 1px 0;
69
+ border-radius: 0;
70
+ }
71
+
72
+ // Add border top radius for first one
73
+ &:first-child {
74
+ .list-group-item:first-child {
75
+ border-top: 0;
76
+ .border-top-radius((@panel-border-radius - 1));
77
+ }
78
+ }
79
+
80
+ // Add border bottom radius for last one
81
+ &:last-child {
82
+ .list-group-item:last-child {
83
+ border-bottom: 0;
84
+ .border-bottom-radius((@panel-border-radius - 1));
85
+ }
86
+ }
87
+ }
88
+ > .panel-heading + .panel-collapse > .list-group {
89
+ .list-group-item:first-child {
90
+ .border-top-radius(0);
91
+ }
92
+ }
93
+ }
94
+ // Collapse space between when there's no additional content.
95
+ .panel-heading + .list-group {
96
+ .list-group-item:first-child {
97
+ border-top-width: 0;
98
+ }
99
+ }
100
+ .list-group + .panel-footer {
101
+ border-top-width: 0;
102
+ }
103
+
104
+ // Tables in panels
105
+ //
106
+ // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
107
+ // watch it go full width.
108
+
109
+ .panel {
110
+ > .table,
111
+ > .table-responsive > .table,
112
+ > .panel-collapse > .table {
113
+ margin-bottom: 0;
114
+
115
+ caption {
116
+ padding-left: @panel-body-padding;
117
+ padding-right: @panel-body-padding;
118
+ }
119
+ }
120
+ // Add border top radius for first one
121
+ > .table:first-child,
122
+ > .table-responsive:first-child > .table:first-child {
123
+ .border-top-radius((@panel-border-radius - 1));
124
+
125
+ > thead:first-child,
126
+ > tbody:first-child {
127
+ > tr:first-child {
128
+ border-top-left-radius: (@panel-border-radius - 1);
129
+ border-top-right-radius: (@panel-border-radius - 1);
130
+
131
+ td:first-child,
132
+ th:first-child {
133
+ border-top-left-radius: (@panel-border-radius - 1);
134
+ }
135
+ td:last-child,
136
+ th:last-child {
137
+ border-top-right-radius: (@panel-border-radius - 1);
138
+ }
139
+ }
140
+ }
141
+ }
142
+ // Add border bottom radius for last one
143
+ > .table:last-child,
144
+ > .table-responsive:last-child > .table:last-child {
145
+ .border-bottom-radius((@panel-border-radius - 1));
146
+
147
+ > tbody:last-child,
148
+ > tfoot:last-child {
149
+ > tr:last-child {
150
+ border-bottom-left-radius: (@panel-border-radius - 1);
151
+ border-bottom-right-radius: (@panel-border-radius - 1);
152
+
153
+ td:first-child,
154
+ th:first-child {
155
+ border-bottom-left-radius: (@panel-border-radius - 1);
156
+ }
157
+ td:last-child,
158
+ th:last-child {
159
+ border-bottom-right-radius: (@panel-border-radius - 1);
160
+ }
161
+ }
162
+ }
163
+ }
164
+ > .panel-body + .table,
165
+ > .panel-body + .table-responsive,
166
+ > .table + .panel-body,
167
+ > .table-responsive + .panel-body {
168
+ border-top: 1px solid @table-border-color;
169
+ }
170
+ > .table > tbody:first-child > tr:first-child th,
171
+ > .table > tbody:first-child > tr:first-child td {
172
+ border-top: 0;
173
+ }
174
+ > .table-bordered,
175
+ > .table-responsive > .table-bordered {
176
+ border: 0;
177
+ > thead,
178
+ > tbody,
179
+ > tfoot {
180
+ > tr {
181
+ > th:first-child,
182
+ > td:first-child {
183
+ border-left: 0;
184
+ }
185
+ > th:last-child,
186
+ > td:last-child {
187
+ border-right: 0;
188
+ }
189
+ }
190
+ }
191
+ > thead,
192
+ > tbody {
193
+ > tr:first-child {
194
+ > td,
195
+ > th {
196
+ border-bottom: 0;
197
+ }
198
+ }
199
+ }
200
+ > tbody,
201
+ > tfoot {
202
+ > tr:last-child {
203
+ > td,
204
+ > th {
205
+ border-bottom: 0;
206
+ }
207
+ }
208
+ }
209
+ }
210
+ > .table-responsive {
211
+ border: 0;
212
+ margin-bottom: 0;
213
+ }
214
+ }
215
+
216
+
217
+ // Collapsable panels (aka, accordion)
218
+ //
219
+ // Wrap a series of panels in `.panel-group` to turn them into an accordion with
220
+ // the help of our collapse JavaScript plugin.
221
+
222
+ .panel-group {
223
+ margin-bottom: @line-height-computed;
224
+
225
+ // Tighten up margin so it's only between panels
226
+ .panel {
227
+ margin-bottom: 0;
228
+ border-radius: @panel-border-radius;
229
+
230
+ + .panel {
231
+ margin-top: 5px;
232
+ }
233
+ }
234
+
235
+ .panel-heading {
236
+ border-bottom: 0;
237
+
238
+ + .panel-collapse > .panel-body,
239
+ + .panel-collapse > .list-group {
240
+ border-top: 1px solid @panel-inner-border;
241
+ }
242
+ }
243
+
244
+ .panel-footer {
245
+ border-top: 0;
246
+ + .panel-collapse .panel-body {
247
+ border-bottom: 1px solid @panel-inner-border;
248
+ }
249
+ }
250
+ }
251
+
252
+
253
+ // Contextual variations
254
+ .panel-default {
255
+ .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);
256
+ }
257
+ .panel-primary {
258
+ .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
259
+ }
260
+ .panel-success {
261
+ .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
262
+ }
263
+ .panel-info {
264
+ .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
265
+ }
266
+ .panel-warning {
267
+ .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
268
+ }
269
+ .panel-danger {
270
+ .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
271
+ }