tables.less 3.2 KB
Newer Older
1
2
/*
 * Tables.less
3
 * Tables for, you guessed it, tabular data
4
 */
Jacob Thornton's avatar
Jacob Thornton committed
5

6
7
8

/* Baseline styles
-------------------------------------------------- */
Jacob Thornton's avatar
Jacob Thornton committed
9
10
11
12
13
14
15

table {
  width: 100%;
  margin-bottom: @baseline;
  padding: 0;
  text-align: left;
  border-collapse: separate;
16
  font-size: 13px;
Jacob Thornton's avatar
Jacob Thornton committed
17
18
  th, td {
    padding: 10px 10px 9px;
19
    line-height: @baseline * .75;
Jacob Thornton's avatar
Jacob Thornton committed
20
21
22
23
24
25
26
27
28
29
    vertical-align: middle;
    border-bottom: 1px solid #ddd;
  }
  th {
    padding-top: 9px;
    font-weight: bold;
    border-bottom-width: 2px;
  }
}

30
31
32

/* Zebra-striping
-------------------------------------------------- */
Jacob Thornton's avatar
Jacob Thornton committed
33
34
35
36
37

// Default zebra-stripe styles (alternating gray and transparent backgrounds)
table.zebra-striped {
  tbody {
    tr:nth-child(odd) td {
38
      background-color: #f9f9f9;
Jacob Thornton's avatar
Jacob Thornton committed
39
40
    }
    tr:hover td {
41
      background-color: #f5f5f5;
Jacob Thornton's avatar
Jacob Thornton committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
    }
  }
  // Tablesorting styles w/ jQuery plugin
  th.header { // For tablesorter tables, make THs have a pointer on hover
    cursor: pointer;
    padding-right: 20px;
  }
  th.headerSortUp,
  th.headerSortDown { // Style the sorted column headers (THs)
    background-image: url(assets/img/tablesorter-indicators.png);
    background-position: right -23px;
    background-repeat: no-repeat;
    background-color: rgba(141,192,219,.25);
    text-shadow: 0 1px 1px rgba(255,255,255,.75);
56
    .border-radius(3px 3px 0 0);
Jacob Thornton's avatar
Jacob Thornton committed
57
58
59
60
61
62
63
  }
  th.header:hover { // Style the ascending (reverse alphabetical) column header
    background-image: url(assets/img/tablesorter-indicators.png);
    background-position: right 15px;
    background-repeat: no-repeat;
  }
  th.actions:hover {
64
    background-image: none;
Jacob Thornton's avatar
Jacob Thornton committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
  }
  th.headerSortDown,
  th.headerSortDown:hover { // Style the descending (alphabetical) column header
    background-position: right -25px;
  }
  th.headerSortUp,
  th.headerSortUp:hover { // Style the ascending (reverse alphabetical) column header
    background-position: right -65px;
  }
  // Blue Table Headings
  th.blue {
    color: @blue;
    border-bottom-color: @blue;
  }
  th.headerSortUp.blue, th.headerSortDown.blue {
    background-color: lighten(@blue, 40%);
  }
  // Green Table Headings
  th.green {
    color: @green;
    border-bottom-color: @green;
  }
  th.headerSortUp.green, th.headerSortDown.green { // backround color is 20% of border color
    background-color: lighten(@green, 40%);
  }
  // Red Table Headings
  th.red {
    color: @red;
    border-bottom-color: @red;
  }
  th.headerSortUp.red, th.headerSortDown.red { // backround color is 20% of border color
    background-color: lighten(@red, 50%);
  }
  // Yellow Table Headings
  th.yellow {
    color: @yellow;
    border-bottom-color: @yellow;
  }
  th.headerSortUp.yellow, th.headerSortDown.yellow { // backround color is 20% of border color
    background-color: lighten(@yellow, 40%);
  }
  // Orange Table Headings
  th.orange {
    color: @orange;
    border-bottom-color: @orange;
  }
  th.headerSortUp.orange, th.headerSortDown.orange { // backround color is 20% of border color
    background-color: lighten(@orange, 40%);
  }
  // Purple Table Headings
  th.purple {
    color: @purple;
    border-bottom-color: @purple;
  }
  th.headerSortUp.purple, th.headerSortDown.purple { // backround color is 20% of border color
    background-color: lighten(@purple, 40%);
  }
}