twitter-bootstrap-rails 2.2.8 → 3.2.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 (181) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +82 -119
  3. data/Rakefile +4 -6
  4. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  5. data/app/assets/fonts/fontawesome-webfont.svg +471 -366
  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 -13
  13. data/app/assets/javascripts/twitter/bootstrap/affix.js +137 -0
  14. data/app/assets/javascripts/twitter/bootstrap/alert.js +88 -0
  15. data/app/assets/javascripts/twitter/bootstrap/button.js +107 -0
  16. data/app/assets/javascripts/twitter/bootstrap/carousel.js +205 -0
  17. data/app/assets/javascripts/twitter/bootstrap/collapse.js +170 -0
  18. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +147 -0
  19. data/app/assets/javascripts/twitter/bootstrap/modal.js +243 -0
  20. data/app/assets/javascripts/twitter/bootstrap/popover.js +110 -0
  21. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +153 -0
  22. data/app/assets/javascripts/twitter/bootstrap/tab.js +125 -0
  23. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +399 -0
  24. data/app/assets/javascripts/twitter/bootstrap/transition.js +48 -0
  25. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
  26. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +4 -787
  27. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
  28. data/app/helpers/bootstrap_flash_helper.rb +7 -5
  29. data/app/helpers/form_errors_helper.rb +22 -0
  30. data/app/helpers/glyph_helper.rb +8 -6
  31. data/app/helpers/modal_helper.rb +29 -21
  32. data/app/helpers/navbar_helper.rb +42 -30
  33. data/app/helpers/twitter_breadcrumbs_helper.rb +3 -2
  34. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +4 -4
  35. data/lib/generators/bootstrap/install/install_generator.rb +3 -2
  36. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +7 -8
  37. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
  38. data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
  39. data/lib/generators/bootstrap/layout/templates/layout.html.erb +22 -43
  40. data/lib/generators/bootstrap/layout/templates/layout.html.haml +16 -31
  41. data/lib/generators/bootstrap/layout/templates/layout.html.slim +10 -25
  42. data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
  43. data/lib/generators/bootstrap/themed/templates/_form.html.erb +25 -8
  44. data/lib/generators/bootstrap/themed/templates/_form.html.haml +7 -7
  45. data/lib/generators/bootstrap/themed/templates/_form.html.slim +7 -7
  46. data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
  47. data/lib/generators/bootstrap/themed/templates/index.html.haml +2 -2
  48. data/lib/generators/bootstrap/themed/templates/index.html.slim +2 -2
  49. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
  50. data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
  51. data/lib/generators/bootstrap/themed/templates/show.html.slim +5 -6
  52. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  53. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
  54. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  55. data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
  56. data/lib/twitter/bootstrap/rails/{twitter-bootstrap-breadcrumbs.rb → breadcrumbs.rb} +24 -8
  57. data/lib/twitter/bootstrap/rails/engine.rb +5 -2
  58. data/lib/twitter/bootstrap/rails/version.rb +2 -2
  59. data/spec/lib/breadcrumbs_spec.rb +74 -0
  60. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +4 -2
  61. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
  62. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +157 -173
  63. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
  64. data/spec/spec_helper.rb +7 -1
  65. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5797 -0
  66. data/vendor/static-source/bootstrap.less +0 -1
  67. data/vendor/static-source/fontawesome.less +0 -1
  68. data/vendor/static-source/sprites.less +1 -1
  69. data/vendor/toolkit/fontawesome/bordered-pulled.less +16 -0
  70. data/vendor/toolkit/fontawesome/core.less +9 -126
  71. data/vendor/toolkit/fontawesome/fixed-width.less +6 -0
  72. data/vendor/toolkit/fontawesome/font-awesome.less +9 -25
  73. data/vendor/toolkit/fontawesome/icons.less +503 -378
  74. data/vendor/toolkit/fontawesome/larger.less +13 -0
  75. data/vendor/toolkit/fontawesome/list.less +19 -0
  76. data/vendor/toolkit/fontawesome/mixins.less +14 -42
  77. data/vendor/toolkit/fontawesome/path.less +1 -1
  78. data/vendor/toolkit/fontawesome/rotated-flipped.less +9 -0
  79. data/vendor/toolkit/fontawesome/spinning.less +32 -0
  80. data/vendor/toolkit/fontawesome/stacked.less +20 -0
  81. data/vendor/toolkit/fontawesome/variables.less +511 -731
  82. data/vendor/toolkit/twitter/bootstrap/alerts.less +47 -58
  83. data/vendor/toolkit/twitter/bootstrap/badges.less +55 -0
  84. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +27 -39
  85. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
  86. data/vendor/toolkit/twitter/bootstrap/button-groups.less +168 -152
  87. data/vendor/toolkit/twitter/bootstrap/buttons.less +101 -170
  88. data/vendor/toolkit/twitter/bootstrap/carousel.less +150 -65
  89. data/vendor/toolkit/twitter/bootstrap/close.less +20 -19
  90. data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
  91. data/vendor/toolkit/twitter/bootstrap/component-animations.less +12 -3
  92. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +115 -148
  93. data/vendor/toolkit/twitter/bootstrap/forms.less +401 -547
  94. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +233 -0
  95. data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
  96. data/vendor/toolkit/twitter/bootstrap/input-groups.less +166 -0
  97. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +48 -0
  98. data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
  99. data/vendor/toolkit/twitter/bootstrap/list-group.less +132 -0
  100. data/vendor/toolkit/twitter/bootstrap/media.less +8 -7
  101. data/vendor/toolkit/twitter/bootstrap/mixins.less +36 -699
  102. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  103. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +8 -0
  104. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  105. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +52 -0
  106. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  107. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  108. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
  109. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  110. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  112. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  113. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
  114. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  115. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +29 -0
  116. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  117. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  118. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  119. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +23 -0
  120. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  121. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  122. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  123. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  124. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  125. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  126. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  127. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  128. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +8 -0
  129. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  130. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +224 -0
  131. data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
  132. data/vendor/toolkit/twitter/bootstrap/navbar.less +542 -384
  133. data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
  134. data/vendor/toolkit/twitter/bootstrap/normalize.less +425 -0
  135. data/vendor/toolkit/twitter/bootstrap/pager.less +46 -34
  136. data/vendor/toolkit/twitter/bootstrap/pagination.less +70 -105
  137. data/vendor/toolkit/twitter/bootstrap/panels.less +248 -0
  138. data/vendor/toolkit/twitter/bootstrap/popovers.less +61 -61
  139. data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
  140. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +51 -73
  141. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +34 -0
  142. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
  143. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +120 -23
  144. data/vendor/toolkit/twitter/bootstrap/tables.less +171 -182
  145. data/vendor/toolkit/twitter/bootstrap/theme.less +260 -0
  146. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +26 -43
  147. data/vendor/toolkit/twitter/bootstrap/tooltip.less +49 -24
  148. data/vendor/toolkit/twitter/bootstrap/type.less +208 -147
  149. data/vendor/toolkit/twitter/bootstrap/utilities.less +33 -7
  150. data/vendor/toolkit/twitter/bootstrap/variables.less +761 -215
  151. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
  152. metadata +128 -138
  153. data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
  154. data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
  155. data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
  156. data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
  157. data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
  158. data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
  159. data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
  160. data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
  161. data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
  162. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
  163. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
  164. data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
  165. data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
  166. data/test/lib/breadcrumbs_test.rb +0 -75
  167. data/test/test_helper.rb +0 -11
  168. data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
  169. data/vendor/toolkit/fontawesome/extras.less +0 -93
  170. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
  171. data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
  172. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
  173. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
  174. data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
  175. data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
  176. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
  177. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
  178. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
  179. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
  180. data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
  181. data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -3,51 +3,148 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
+ // Reset the box-sizing
7
+ //
8
+ // Heads up! This reset may cause conflicts with some third-party widgets.
9
+ // For recommendations on resolving such conflicts, see
10
+ // http://getbootstrap.com/getting-started/#third-box-sizing
11
+ * {
12
+ .box-sizing(border-box);
13
+ }
14
+ *:before,
15
+ *:after {
16
+ .box-sizing(border-box);
17
+ }
18
+
19
+
6
20
  // Body reset
7
- // -------------------------
21
+
22
+ html {
23
+ font-size: 10px;
24
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
25
+ }
8
26
 
9
27
  body {
10
- margin: 0;
11
- font-family: @baseFontFamily;
12
- font-size: @baseFontSize;
13
- line-height: @baseLineHeight;
14
- color: @textColor;
15
- background-color: @bodyBackground;
28
+ font-family: @font-family-base;
29
+ font-size: @font-size-base;
30
+ line-height: @line-height-base;
31
+ color: @text-color;
32
+ background-color: @body-bg;
33
+ }
34
+
35
+ // Reset fonts for relevant elements
36
+ input,
37
+ button,
38
+ select,
39
+ textarea {
40
+ font-family: inherit;
41
+ font-size: inherit;
42
+ line-height: inherit;
16
43
  }
17
44
 
18
45
 
19
46
  // Links
20
- // -------------------------
21
47
 
22
48
  a {
23
- color: @linkColor;
49
+ color: @link-color;
24
50
  text-decoration: none;
51
+
52
+ &:hover,
53
+ &:focus {
54
+ color: @link-hover-color;
55
+ text-decoration: underline;
56
+ }
57
+
58
+ &:focus {
59
+ .tab-focus();
60
+ }
25
61
  }
26
- a:hover,
27
- a:focus {
28
- color: @linkColorHover;
29
- text-decoration: underline;
62
+
63
+
64
+ // Figures
65
+ //
66
+ // We reset this here because previously Normalize had no `figure` margins. This
67
+ // ensures we don't break anyone's use of the element.
68
+
69
+ figure {
70
+ margin: 0;
30
71
  }
31
72
 
32
73
 
33
74
  // Images
34
- // -------------------------
75
+
76
+ img {
77
+ vertical-align: middle;
78
+ }
79
+
80
+ // Responsive images (ensure images don't scale beyond their parents)
81
+ .img-responsive {
82
+ .img-responsive();
83
+ }
35
84
 
36
85
  // Rounded corners
37
86
  .img-rounded {
38
- .border-radius(6px);
87
+ border-radius: @border-radius-large;
39
88
  }
40
89
 
41
- // Add polaroid-esque trim
42
- .img-polaroid {
43
- padding: 4px;
44
- background-color: #fff;
45
- border: 1px solid #ccc;
46
- border: 1px solid rgba(0,0,0,.2);
47
- .box-shadow(0 1px 3px rgba(0,0,0,.1));
90
+ // Image thumbnails
91
+ //
92
+ // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
93
+ .img-thumbnail {
94
+ padding: @thumbnail-padding;
95
+ line-height: @line-height-base;
96
+ background-color: @thumbnail-bg;
97
+ border: 1px solid @thumbnail-border;
98
+ border-radius: @thumbnail-border-radius;
99
+ .transition(all .2s ease-in-out);
100
+
101
+ // Keep them at most 100% wide
102
+ .img-responsive(inline-block);
48
103
  }
49
104
 
50
105
  // Perfect circle
51
106
  .img-circle {
52
- .border-radius(500px); // crank the border-radius so it works with most reasonably sized images
107
+ border-radius: 50%; // set radius in percents
108
+ }
109
+
110
+
111
+ // Horizontal rules
112
+
113
+ hr {
114
+ margin-top: @line-height-computed;
115
+ margin-bottom: @line-height-computed;
116
+ border: 0;
117
+ border-top: 1px solid @hr-border;
118
+ }
119
+
120
+
121
+ // Only display content to screen readers
122
+ //
123
+ // See: http://a11yproject.com/posts/how-to-hide-content/
124
+
125
+ .sr-only {
126
+ position: absolute;
127
+ width: 1px;
128
+ height: 1px;
129
+ margin: -1px;
130
+ padding: 0;
131
+ overflow: hidden;
132
+ clip: rect(0,0,0,0);
133
+ border: 0;
134
+ }
135
+
136
+ // Use in conjunction with .sr-only to only display content when it's focused.
137
+ // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
138
+ // Credit: HTML5 Boilerplate
139
+
140
+ .sr-only-focusable {
141
+ &:active,
142
+ &:focus {
143
+ position: static;
144
+ width: auto;
145
+ height: auto;
146
+ margin: 0;
147
+ overflow: visible;
148
+ clip: auto;
149
+ }
53
150
  }
@@ -3,242 +3,231 @@
3
3
  // --------------------------------------------------
4
4
 
5
5
 
6
- // BASE TABLES
7
- // -----------------
8
-
9
6
  table {
10
- max-width: 100%;
11
- background-color: @tableBackground;
12
- border-collapse: collapse;
13
- border-spacing: 0;
7
+ background-color: @table-bg;
8
+ }
9
+ caption {
10
+ padding-top: @table-cell-padding;
11
+ padding-bottom: @table-cell-padding;
12
+ color: @text-muted;
13
+ text-align: left;
14
+ }
15
+ th {
16
+ text-align: left;
14
17
  }
15
18
 
16
- // BASELINE STYLES
17
- // ---------------
19
+
20
+ // Baseline styles
18
21
 
19
22
  .table {
20
23
  width: 100%;
21
- margin-bottom: @baseLineHeight;
24
+ max-width: 100%;
25
+ margin-bottom: @line-height-computed;
22
26
  // Cells
23
- th,
24
- td {
25
- padding: 8px;
26
- line-height: @baseLineHeight;
27
- text-align: left;
28
- vertical-align: top;
29
- border-top: 1px solid @tableBorder;
30
- }
31
- th {
32
- font-weight: bold;
27
+ > thead,
28
+ > tbody,
29
+ > tfoot {
30
+ > tr {
31
+ > th,
32
+ > td {
33
+ padding: @table-cell-padding;
34
+ line-height: @line-height-base;
35
+ vertical-align: top;
36
+ border-top: 1px solid @table-border-color;
37
+ }
38
+ }
33
39
  }
34
40
  // Bottom align for column headings
35
- thead th {
41
+ > thead > tr > th {
36
42
  vertical-align: bottom;
43
+ border-bottom: 2px solid @table-border-color;
37
44
  }
38
45
  // Remove top border from thead by default
39
- caption + thead tr:first-child th,
40
- caption + thead tr:first-child td,
41
- colgroup + thead tr:first-child th,
42
- colgroup + thead tr:first-child td,
43
- thead:first-child tr:first-child th,
44
- thead:first-child tr:first-child td {
45
- border-top: 0;
46
+ > caption + thead,
47
+ > colgroup + thead,
48
+ > thead:first-child {
49
+ > tr:first-child {
50
+ > th,
51
+ > td {
52
+ border-top: 0;
53
+ }
54
+ }
46
55
  }
47
56
  // Account for multiple tbody instances
48
- tbody + tbody {
49
- border-top: 2px solid @tableBorder;
57
+ > tbody + tbody {
58
+ border-top: 2px solid @table-border-color;
50
59
  }
51
60
 
52
61
  // Nesting
53
62
  .table {
54
- background-color: @bodyBackground;
63
+ background-color: @body-bg;
55
64
  }
56
65
  }
57
66
 
58
67
 
59
-
60
- // CONDENSED TABLE W/ HALF PADDING
61
- // -------------------------------
68
+ // Condensed table w/ half padding
62
69
 
63
70
  .table-condensed {
64
- th,
65
- td {
66
- padding: 4px 5px;
71
+ > thead,
72
+ > tbody,
73
+ > tfoot {
74
+ > tr {
75
+ > th,
76
+ > td {
77
+ padding: @table-condensed-cell-padding;
78
+ }
79
+ }
67
80
  }
68
81
  }
69
82
 
70
83
 
71
- // BORDERED VERSION
72
- // ----------------
84
+ // Bordered version
85
+ //
86
+ // Add borders all around the table and between all the columns.
73
87
 
74
88
  .table-bordered {
75
- border: 1px solid @tableBorder;
76
- border-collapse: separate; // Done so we can round those corners!
77
- *border-collapse: collapse; // IE7 can't round corners anyway
78
- border-left: 0;
79
- .border-radius(@baseBorderRadius);
80
- th,
81
- td {
82
- border-left: 1px solid @tableBorder;
83
- }
84
- // Prevent a double border
85
- caption + thead tr:first-child th,
86
- caption + tbody tr:first-child th,
87
- caption + tbody tr:first-child td,
88
- colgroup + thead tr:first-child th,
89
- colgroup + tbody tr:first-child th,
90
- colgroup + tbody tr:first-child td,
91
- thead:first-child tr:first-child th,
92
- tbody:first-child tr:first-child th,
93
- tbody:first-child tr:first-child td {
94
- border-top: 0;
95
- }
96
- // For first th/td in the first row in the first thead or tbody
97
- thead:first-child tr:first-child > th:first-child,
98
- tbody:first-child tr:first-child > td:first-child,
99
- tbody:first-child tr:first-child > th:first-child {
100
- .border-top-left-radius(@baseBorderRadius);
101
- }
102
- // For last th/td in the first row in the first thead or tbody
103
- thead:first-child tr:first-child > th:last-child,
104
- tbody:first-child tr:first-child > td:last-child,
105
- tbody:first-child tr:first-child > th:last-child {
106
- .border-top-right-radius(@baseBorderRadius);
107
- }
108
- // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
109
- thead:last-child tr:last-child > th:first-child,
110
- tbody:last-child tr:last-child > td:first-child,
111
- tbody:last-child tr:last-child > th:first-child,
112
- tfoot:last-child tr:last-child > td:first-child,
113
- tfoot:last-child tr:last-child > th:first-child {
114
- .border-bottom-left-radius(@baseBorderRadius);
115
- }
116
- // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
117
- thead:last-child tr:last-child > th:last-child,
118
- tbody:last-child tr:last-child > td:last-child,
119
- tbody:last-child tr:last-child > th:last-child,
120
- tfoot:last-child tr:last-child > td:last-child,
121
- tfoot:last-child tr:last-child > th:last-child {
122
- .border-bottom-right-radius(@baseBorderRadius);
123
- }
124
-
125
- // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
126
- tfoot + tbody:last-child tr:last-child td:first-child {
127
- .border-bottom-left-radius(0);
128
- }
129
- tfoot + tbody:last-child tr:last-child td:last-child {
130
- .border-bottom-right-radius(0);
131
- }
132
-
133
- // Special fixes to round the left border on the first td/th
134
- caption + thead tr:first-child th:first-child,
135
- caption + tbody tr:first-child td:first-child,
136
- colgroup + thead tr:first-child th:first-child,
137
- colgroup + tbody tr:first-child td:first-child {
138
- .border-top-left-radius(@baseBorderRadius);
89
+ border: 1px solid @table-border-color;
90
+ > thead,
91
+ > tbody,
92
+ > tfoot {
93
+ > tr {
94
+ > th,
95
+ > td {
96
+ border: 1px solid @table-border-color;
97
+ }
98
+ }
139
99
  }
140
- caption + thead tr:first-child th:last-child,
141
- caption + tbody tr:first-child td:last-child,
142
- colgroup + thead tr:first-child th:last-child,
143
- colgroup + tbody tr:first-child td:last-child {
144
- .border-top-right-radius(@baseBorderRadius);
100
+ > thead > tr {
101
+ > th,
102
+ > td {
103
+ border-bottom-width: 2px;
104
+ }
145
105
  }
146
-
147
106
  }
148
107
 
149
108
 
150
-
151
-
152
- // ZEBRA-STRIPING
153
- // --------------
154
-
109
+ // Zebra-striping
110
+ //
155
111
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
112
+
156
113
  .table-striped {
157
- tbody {
158
- > tr:nth-child(odd) > td,
159
- > tr:nth-child(odd) > th {
160
- background-color: @tableBackgroundAccent;
161
- }
114
+ > tbody > tr:nth-child(odd) {
115
+ background-color: @table-bg-accent;
162
116
  }
163
117
  }
164
118
 
165
119
 
166
- // HOVER EFFECT
167
- // ------------
120
+ // Hover effect
121
+ //
168
122
  // Placed here since it has to come after the potential zebra striping
123
+
169
124
  .table-hover {
170
- tbody {
171
- tr:hover > td,
172
- tr:hover > th {
173
- background-color: @tableBackgroundHover;
174
- }
125
+ > tbody > tr:hover {
126
+ background-color: @table-bg-hover;
175
127
  }
176
128
  }
177
129
 
178
130
 
179
- // TABLE CELL SIZING
180
- // -----------------
131
+ // Table cell sizing
132
+ //
133
+ // Reset default table behavior
181
134
 
182
- // Reset default grid behavior
183
- table td[class*="span"],
184
- table th[class*="span"],
185
- .row-fluid table td[class*="span"],
186
- .row-fluid table th[class*="span"] {
187
- display: table-cell;
188
- float: none; // undo default grid column styles
189
- margin-left: 0; // undo default grid column styles
135
+ table col[class*="col-"] {
136
+ position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
137
+ float: none;
138
+ display: table-column;
190
139
  }
191
-
192
- // Change the column widths to account for td/th padding
193
- .table td,
194
- .table th {
195
- &.span1 { .tableColumns(1); }
196
- &.span2 { .tableColumns(2); }
197
- &.span3 { .tableColumns(3); }
198
- &.span4 { .tableColumns(4); }
199
- &.span5 { .tableColumns(5); }
200
- &.span6 { .tableColumns(6); }
201
- &.span7 { .tableColumns(7); }
202
- &.span8 { .tableColumns(8); }
203
- &.span9 { .tableColumns(9); }
204
- &.span10 { .tableColumns(10); }
205
- &.span11 { .tableColumns(11); }
206
- &.span12 { .tableColumns(12); }
140
+ table {
141
+ td,
142
+ th {
143
+ &[class*="col-"] {
144
+ position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
145
+ float: none;
146
+ display: table-cell;
147
+ }
148
+ }
207
149
  }
208
150
 
209
151
 
152
+ // Table backgrounds
153
+ //
154
+ // Exact selectors below required to override `.table-striped` and prevent
155
+ // inheritance to nested tables.
210
156
 
211
- // TABLE BACKGROUNDS
212
- // -----------------
213
- // Exact selectors below required to override .table-striped
157
+ // Generate the contextual variants
158
+ .table-row-variant(active; @table-bg-active);
159
+ .table-row-variant(success; @state-success-bg);
160
+ .table-row-variant(info; @state-info-bg);
161
+ .table-row-variant(warning; @state-warning-bg);
162
+ .table-row-variant(danger; @state-danger-bg);
214
163
 
215
- .table tbody tr {
216
- &.success > td {
217
- background-color: @successBackground;
218
- }
219
- &.error > td {
220
- background-color: @errorBackground;
221
- }
222
- &.warning > td {
223
- background-color: @warningBackground;
224
- }
225
- &.info > td {
226
- background-color: @infoBackground;
227
- }
228
- }
229
164
 
230
- // Hover states for .table-hover
231
- .table-hover tbody tr {
232
- &.success:hover > td {
233
- background-color: darken(@successBackground, 5%);
234
- }
235
- &.error:hover > td {
236
- background-color: darken(@errorBackground, 5%);
237
- }
238
- &.warning:hover > td {
239
- background-color: darken(@warningBackground, 5%);
240
- }
241
- &.info:hover > td {
242
- background-color: darken(@infoBackground, 5%);
165
+ // Responsive tables
166
+ //
167
+ // Wrap your tables in `.table-responsive` and we'll make them mobile friendly
168
+ // by enabling horizontal scrolling. Only applies <768px. Everything above that
169
+ // will display normally.
170
+
171
+ .table-responsive {
172
+ @media screen and (max-width: @screen-xs-max) {
173
+ width: 100%;
174
+ margin-bottom: (@line-height-computed * 0.75);
175
+ overflow-y: hidden;
176
+ overflow-x: auto;
177
+ -ms-overflow-style: -ms-autohiding-scrollbar;
178
+ border: 1px solid @table-border-color;
179
+ -webkit-overflow-scrolling: touch;
180
+
181
+ // Tighten up spacing
182
+ > .table {
183
+ margin-bottom: 0;
184
+
185
+ // Ensure the content doesn't wrap
186
+ > thead,
187
+ > tbody,
188
+ > tfoot {
189
+ > tr {
190
+ > th,
191
+ > td {
192
+ white-space: nowrap;
193
+ }
194
+ }
195
+ }
196
+ }
197
+
198
+ // Special overrides for the bordered tables
199
+ > .table-bordered {
200
+ border: 0;
201
+
202
+ // Nuke the appropriate borders so that the parent can handle them
203
+ > thead,
204
+ > tbody,
205
+ > tfoot {
206
+ > tr {
207
+ > th:first-child,
208
+ > td:first-child {
209
+ border-left: 0;
210
+ }
211
+ > th:last-child,
212
+ > td:last-child {
213
+ border-right: 0;
214
+ }
215
+ }
216
+ }
217
+
218
+ // Only nuke the last row's bottom-border in `tbody` and `tfoot` since
219
+ // chances are there will be only one `tr` in a `thead` and that would
220
+ // remove the border altogether.
221
+ > tbody,
222
+ > tfoot {
223
+ > tr:last-child {
224
+ > th,
225
+ > td {
226
+ border-bottom: 0;
227
+ }
228
+ }
229
+ }
230
+
231
+ }
243
232
  }
244
233
  }