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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2011-10-31 22:37:10 -04:00
|
|
|
// ----------------
|
|
|
|
|
|
|
|
// This is a duplication of the main grid .columns() mixin, but subtracts 20px to account for input padding and border
|
|
|
|
.tableColumns(@columnSpan: 1) {
|
|
|
|
width: ((@gridColumnWidth - 20) * @columnSpan) + ((@gridColumnWidth - 20) * (@columnSpan - 1));
|
|
|
|
}
|
|
|
|
table {
|
|
|
|
// Default columns
|
|
|
|
.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); }
|
|
|
|
.span13 { .tableColumns(13); }
|
|
|
|
.span14 { .tableColumns(14); }
|
|
|
|
.span15 { .tableColumns(15); }
|
|
|
|
.span16 { .tableColumns(16); }
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TABLESORTER
|
|
|
|
// -----------
|
|
|
|
|
|
|
|
table {
|
2011-05-03 21:09:25 -04:00
|
|
|
// Tablesorting styles w/ jQuery plugin
|
2011-08-21 23:07:15 -04:00
|
|
|
.header {
|
2011-05-03 21:09:25 -04:00
|
|
|
cursor: pointer;
|
2011-07-02 14:51:05 -04:00
|
|
|
&:after {
|
|
|
|
float: right;
|
2011-08-19 22:52:07 -04:00
|
|
|
margin-top: 7px;
|
|
|
|
border-width: 0 4px 4px;
|
|
|
|
border-style: solid;
|
|
|
|
border-color: #000 transparent;
|
2011-11-17 04:28:42 -05:00
|
|
|
content: "";
|
2011-08-19 22:52:07 -04:00
|
|
|
visibility: hidden;
|
2011-07-02 14:51:05 -04:00
|
|
|
}
|
2011-05-03 21:09:25 -04:00
|
|
|
}
|
2011-08-17 01:58:01 -04:00
|
|
|
// Style the sorted column headers (THs)
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp,
|
|
|
|
.headerSortDown {
|
2011-05-03 21:09:25 -04:00
|
|
|
text-shadow: 0 1px 1px rgba(255,255,255,.75);
|
2011-11-17 04:28:42 -05:00
|
|
|
background-color: rgba(141,192,219,.25);
|
2011-05-03 21:09:25 -04:00
|
|
|
}
|
2011-08-17 01:58:01 -04:00
|
|
|
// Style the ascending (reverse alphabetical) column header
|
2011-08-21 23:07:15 -04:00
|
|
|
.header:hover {
|
2011-07-02 14:51:05 -04:00
|
|
|
&:after {
|
2011-11-17 04:28:42 -05:00
|
|
|
visibility: visible;
|
2011-07-02 14:51:05 -04:00
|
|
|
}
|
2011-05-03 21:09:25 -04:00
|
|
|
}
|
2011-08-17 01:58:01 -04:00
|
|
|
// Style the descending (alphabetical) column header
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortDown,
|
|
|
|
.headerSortDown:hover {
|
2011-07-02 14:51:05 -04:00
|
|
|
&:after {
|
2011-11-17 04:28:42 -05:00
|
|
|
visibility: visible;
|
2011-07-02 14:51:05 -04:00
|
|
|
.opacity(60);
|
|
|
|
}
|
2011-05-03 21:09:25 -04:00
|
|
|
}
|
2011-08-17 01:58:01 -04:00
|
|
|
// Style the ascending (reverse alphabetical) column header
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp {
|
2011-07-02 14:51:05 -04:00
|
|
|
&: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);
|
|
|
|
}
|
2011-05-03 21:09:25 -04:00
|
|
|
}
|
|
|
|
// Blue Table Headings
|
2011-08-21 23:07:15 -04:00
|
|
|
.blue {
|
2011-05-03 21:09:25 -04:00
|
|
|
color: @blue;
|
|
|
|
border-bottom-color: @blue;
|
|
|
|
}
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp.blue,
|
|
|
|
.headerSortDown.blue {
|
2011-05-03 21:09:25 -04:00
|
|
|
background-color: lighten(@blue, 40%);
|
|
|
|
}
|
|
|
|
// Green Table Headings
|
2011-08-21 23:07:15 -04:00
|
|
|
.green {
|
2011-05-03 21:09:25 -04:00
|
|
|
color: @green;
|
|
|
|
border-bottom-color: @green;
|
|
|
|
}
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp.green,
|
|
|
|
.headerSortDown.green {
|
2011-05-03 21:09:25 -04:00
|
|
|
background-color: lighten(@green, 40%);
|
|
|
|
}
|
|
|
|
// Red Table Headings
|
2011-08-21 23:07:15 -04:00
|
|
|
.red {
|
2011-05-03 21:09:25 -04:00
|
|
|
color: @red;
|
|
|
|
border-bottom-color: @red;
|
|
|
|
}
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp.red,
|
|
|
|
.headerSortDown.red {
|
2011-05-03 21:09:25 -04:00
|
|
|
background-color: lighten(@red, 50%);
|
|
|
|
}
|
|
|
|
// Yellow Table Headings
|
2011-08-21 23:07:15 -04:00
|
|
|
.yellow {
|
2011-05-03 21:09:25 -04:00
|
|
|
color: @yellow;
|
|
|
|
border-bottom-color: @yellow;
|
|
|
|
}
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp.yellow,
|
|
|
|
.headerSortDown.yellow {
|
2011-05-03 21:09:25 -04:00
|
|
|
background-color: lighten(@yellow, 40%);
|
|
|
|
}
|
|
|
|
// Orange Table Headings
|
2011-08-21 23:07:15 -04:00
|
|
|
.orange {
|
2011-05-03 21:09:25 -04:00
|
|
|
color: @orange;
|
|
|
|
border-bottom-color: @orange;
|
|
|
|
}
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp.orange,
|
|
|
|
.headerSortDown.orange {
|
2011-05-03 21:09:25 -04:00
|
|
|
background-color: lighten(@orange, 40%);
|
|
|
|
}
|
|
|
|
// Purple Table Headings
|
2011-08-21 23:07:15 -04:00
|
|
|
.purple {
|
2011-05-03 21:09:25 -04:00
|
|
|
color: @purple;
|
|
|
|
border-bottom-color: @purple;
|
|
|
|
}
|
2011-08-21 23:07:15 -04:00
|
|
|
.headerSortUp.purple,
|
|
|
|
.headerSortDown.purple {
|
2011-05-03 21:09:25 -04:00
|
|
|
background-color: lighten(@purple, 40%);
|
|
|
|
}
|
2011-11-30 01:35:58 -05:00
|
|
|
}*/
|