3 // --------------------------------------------------
11 background-color: @tableBackground;
12 border-collapse: collapse;
21 margin-bottom: @baseLineHeight;
26 line-height: @baseLineHeight;
29 border-top: 1px solid @tableBorder;
34 // Bottom align for column headings
36 vertical-align: bottom;
38 // 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 {
47 // Account for multiple tbody instances
49 border-top: 2px solid @tableBorder;
54 background-color: @bodyBackground;
60 // CONDENSED TABLE W/ HALF PADDING
61 // -------------------------------
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
79 .border-radius(@baseBorderRadius);
82 border-left: 1px solid @tableBorder;
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 {
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);
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);
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);
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);
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);
129 tfoot + tbody:last-child tr:last-child td:last-child {
130 .border-bottom-right-radius(0);
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);
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);
155 // Default zebra-stripe styles (alternating gray and transparent backgrounds)
158 > tr:nth-child(odd) > td,
159 > tr:nth-child(odd) > th {
160 background-color: @tableBackgroundAccent;
168 // Placed here since it has to come after the potential zebra striping
173 background-color: @tableBackgroundHover;
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"] {
188 float: none; // undo default grid column styles
189 margin-left: 0; // undo default grid column styles
192 // Change the column widths to account for td/th padding
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); }
213 // Exact selectors below required to override .table-striped
217 background-color: @successBackground;
220 background-color: @errorBackground;
223 background-color: @warningBackground;
226 background-color: @infoBackground;
230 // Hover states for .table-hover
231 .table-hover tbody tr {
232 &.success:hover > td {
233 background-color: darken(@successBackground, 5%);
236 background-color: darken(@errorBackground, 5%);
238 &.warning:hover > td {
239 background-color: darken(@warningBackground, 5%);
242 background-color: darken(@infoBackground, 5%);