2011-11-26 00:34:55 -05:00
|
|
|
//
|
|
|
|
// Tables.less
|
|
|
|
// Tables for, you guessed it, tabular data
|
|
|
|
// ----------------------------------------
|
2011-05-03 21:09:25 -04:00
|
|
|
|
2011-06-30 03:15:37 -04:00
|
|
|
|
2011-11-30 01:35:03 -05:00
|
|
|
|
2011-08-17 01:58:01 -04:00
|
|
|
// BASELINE STYLES
|
|
|
|
// ---------------
|
2011-05-03 21:09:25 -04:00
|
|
|
|
|
|
|
table {
|
|
|
|
width: 100%;
|
2011-10-31 22:37:10 -04:00
|
|
|
margin-bottom: @baseLineHeight;
|
2011-11-30 01:35:03 -05:00
|
|
|
}
|
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding: 8px;
|
|
|
|
line-height: @baseLineHeight;
|
|
|
|
text-align: left;
|
2011-12-27 18:04:55 -05:00
|
|
|
border-top: 1px solid #ddd;
|
2011-11-30 01:35:03 -05:00
|
|
|
}
|
|
|
|
th {
|
|
|
|
font-weight: bold;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
td {
|
|
|
|
vertical-align: top;
|
|
|
|
}
|
2011-10-31 22:37:10 -04:00
|
|
|
|
|
|
|
|
2011-11-30 01:35:03 -05:00
|
|
|
// CONDENSED TABLE W/ HALF PADDING
|
|
|
|
// -------------------------------
|
2011-10-31 22:37:10 -04:00
|
|
|
|
|
|
|
.condensed-table {
|
|
|
|
th,
|
|
|
|
td {
|
2011-11-30 01:35:03 -05:00
|
|
|
padding: 4px 5px;
|
2011-09-08 13:47:05 -04:00
|
|
|
}
|
2011-10-31 22:37:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// BORDERED VERSION
|
|
|
|
// ----------------
|
|
|
|
|
|
|
|
.bordered-table {
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
border-collapse: separate; // Done so we can round those corners!
|
|
|
|
.border-radius(4px);
|
2011-09-09 02:01:28 -04:00
|
|
|
th + th,
|
2011-10-31 22:37:10 -04:00
|
|
|
td + td,
|
2011-11-30 01:35:03 -05:00
|
|
|
th + td,
|
|
|
|
td + th {
|
2011-09-09 02:01:28 -04:00
|
|
|
border-left: 1px solid #ddd;
|
|
|
|
}
|
2012-01-05 04:34:14 -05:00
|
|
|
// Prevent a double border
|
|
|
|
thead:first-child tr:first-child th,
|
|
|
|
tbody:first-child tr:first-child td {
|
|
|
|
border-top: 0;
|
|
|
|
}
|
2011-11-30 01:35:03 -05:00
|
|
|
// For first th or td in the first row in the first thead or tbody
|
2011-10-31 22:37:10 -04:00
|
|
|
thead:first-child tr:first-child th:first-child,
|
|
|
|
tbody:first-child tr:first-child td:first-child {
|
2011-09-09 02:01:28 -04:00
|
|
|
.border-radius(4px 0 0 0);
|
|
|
|
}
|
2011-10-31 22:37:10 -04:00
|
|
|
thead:first-child tr:first-child th:last-child,
|
|
|
|
tbody:first-child tr:first-child td:last-child {
|
2011-09-09 02:01:28 -04:00
|
|
|
.border-radius(0 4px 0 0);
|
|
|
|
}
|
2011-11-30 01:35:03 -05:00
|
|
|
// For first th or td in the first row in the first thead or tbody
|
|
|
|
thead:last-child tr:last-child th:first-child,
|
|
|
|
tbody:last-child tr:last-child td:first-child {
|
2011-09-09 02:01:28 -04:00
|
|
|
.border-radius(0 0 0 4px);
|
|
|
|
}
|
2011-11-30 01:35:03 -05:00
|
|
|
thead:last-child tr:last-child th:last-child,
|
|
|
|
tbody:last-child tr:last-child td:last-child {
|
2011-09-09 02:01:28 -04:00
|
|
|
.border-radius(0 0 4px 0);
|
|
|
|
}
|
2011-05-03 21:09:25 -04:00
|
|
|
}
|
|
|
|
|
2011-06-30 03:15:37 -04:00
|
|
|
|
2011-11-30 01:35:03 -05:00
|
|
|
// ZEBRA-STRIPING
|
|
|
|
// --------------
|
|
|
|
|
|
|
|
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
|
|
|
.striped-table {
|
|
|
|
tbody {
|
|
|
|
tr:nth-child(odd) td,
|
|
|
|
tr:nth-child(odd) th {
|
|
|
|
background-color: #f9f9f9;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-07 07:34:30 -05:00
|
|
|
// TABLE CELL SIZING
|
|
|
|
// -----------------
|
2011-10-31 22:37:10 -04:00
|
|
|
|
2012-01-07 07:34:30 -05:00
|
|
|
// Change the columns
|
2011-10-31 22:37:10 -04:00
|
|
|
.tableColumns(@columnSpan: 1) {
|
2012-01-07 07:34:30 -05:00
|
|
|
float: none;
|
|
|
|
width: ((@gridColumnWidth) * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)) - 16;
|
|
|
|
margin-left: 0;
|
2011-10-31 22:37:10 -04:00
|
|
|
}
|
|
|
|
table {
|
|
|
|
.span1 { .tableColumns(1); }
|
|
|
|
.span2 { .tableColumns(2); }
|
|
|
|
.span3 { .tableColumns(3); }
|
|
|
|
.span4 { .tableColumns(4); }
|
|
|
|
.span5 { .tableColumns(5); }
|
|
|
|
.span6 { .tableColumns(6); }
|
|
|
|
.span7 { .tableColumns(7); }
|
|
|
|
.span8 { .tableColumns(8); }
|
|
|
|
.span9 { .tableColumns(9); }
|
|
|
|
.span10 { .tableColumns(10); }
|
|
|
|
.span11 { .tableColumns(11); }
|
|
|
|
.span12 { .tableColumns(12); }
|
|
|
|
}
|
2012-01-07 15:22:51 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TABLESORTER
|
|
|
|
// -----------
|
|
|
|
// Support for the tablesorter jQuerdy plugin
|
|
|
|
|
|
|
|
table {
|
|
|
|
// Tablesorting styles w/ jQuery plugin
|
|
|
|
.header {
|
|
|
|
cursor: pointer;
|
|
|
|
&:after {
|
|
|
|
content: "";
|
|
|
|
float: right;
|
|
|
|
margin-top: 7px;
|
|
|
|
border-width: 0 4px 4px;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: #000 transparent;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Style the sorted column headers (THs)
|
|
|
|
.headerSortUp,
|
|
|
|
.headerSortDown {
|
|
|
|
background-color: rgba(141,192,219,.25);
|
|
|
|
text-shadow: 0 1px 1px rgba(255,255,255,.75);
|
|
|
|
}
|
|
|
|
// Style the ascending (reverse alphabetical) column header
|
|
|
|
.header:hover {
|
|
|
|
&:after {
|
|
|
|
visibility:visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Style the descending (alphabetical) column header
|
|
|
|
.headerSortDown,
|
|
|
|
.headerSortDown:hover {
|
|
|
|
&:after {
|
|
|
|
visibility:visible;
|
|
|
|
.opacity(60);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Style the ascending (reverse alphabetical) column header
|
|
|
|
.headerSortUp {
|
|
|
|
&:after {
|
|
|
|
border-bottom: none;
|
|
|
|
border-left: 4px solid transparent;
|
|
|
|
border-right: 4px solid transparent;
|
|
|
|
border-top: 4px solid #000;
|
|
|
|
visibility:visible;
|
|
|
|
.box-shadow(none); //can't add boxshadow to downward facing arrow :(
|
|
|
|
.opacity(60);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|