|
13 | 13 | // ex. table(striped: true)
|
14 | 14 |
|
15 | 15 | @mixin table($border : true, $striped : true, $condensed : false) {
|
16 |
| - max-width: 100%; |
17 | 16 | border-collapse: collapse;
|
18 | 17 | border-spacing: 0;
|
19 |
| - width: 100%; |
20 | 18 | margin-bottom: 18px;
|
| 19 | + max-width: 100%; |
| 20 | + width: 100%; |
21 | 21 |
|
22 |
| - th, td { |
23 |
| - padding: 8px; |
| 22 | + th, |
| 23 | + td { |
| 24 | + border-top: 1px solid #DDD; |
24 | 25 | line-height: 18px;
|
| 26 | + padding: 8px; |
25 | 27 | text-align: left;
|
26 | 28 | vertical-align: top;
|
27 |
| - border-top: 1px solid #ddd; |
28 | 29 | }
|
29 | 30 |
|
30 | 31 | th {
|
31 | 32 | font-weight: bold;
|
32 | 33 | }
|
33 | 34 |
|
34 | 35 | thead th {
|
35 |
| - vertical-align: bottom; |
| 36 | + vertical-align: bottom; |
36 | 37 | }
|
37 | 38 |
|
38 | 39 | thead:first-child tr th,
|
|
41 | 42 | }
|
42 | 43 |
|
43 | 44 | tbody + tbody {
|
44 |
| - border-top: 2px solid #ddd; |
| 45 | + border-top: 2px solid #DDD; |
45 | 46 | }
|
46 | 47 |
|
47 | 48 | @if $condensed {
|
48 |
| - th, td { |
| 49 | + th, |
| 50 | + td { |
49 | 51 | padding: 4px 5px;
|
50 | 52 | }
|
51 | 53 | }
|
52 | 54 |
|
53 | 55 | @if $border {
|
54 |
| - border: 1px solid #ddd; |
| 56 | + border: 1px solid #DDD; |
55 | 57 | border-collapse: separate;
|
56 |
| - *border-collapse: collapsed; |
57 | 58 | border-radius: 4px;
|
58 | 59 |
|
59 |
| - th + th, td + td, th + td, td + th { |
60 |
| - border-left: 1px solid #ddd; |
| 60 | + th + th, |
| 61 | + td + td, |
| 62 | + th + td, |
| 63 | + td + th { |
| 64 | + border-left: 1px solid #DDD; |
61 | 65 | }
|
62 | 66 |
|
63 | 67 | thead:first-child tr:first-child th,
|
|
68 | 72 |
|
69 | 73 | thead:first-child tr:first-child th:first-child,
|
70 | 74 | tbody:first-child tr:first-child td:first-child {
|
71 |
| - border-radius: 4px 0 0 0; |
| 75 | + border-radius: 4px 0 0; |
72 | 76 | }
|
73 | 77 |
|
74 | 78 | thead:first-child tr:first-child th:last-child,
|
75 | 79 | tbody:first-child tr:first-child td:last-child {
|
76 |
| - border-radius: 0 4px 0 0; |
| 80 | + border-radius: 0 4px; |
77 | 81 | }
|
78 | 82 |
|
79 | 83 | thead:last-child tr:last-child th:first-child,
|
|
83 | 87 |
|
84 | 88 | thead:last-child tr:last-child th:last-child,
|
85 | 89 | tbody:last-child tr:last-child td:last-child {
|
86 |
| - border-radius: 0 0 4px 0; |
| 90 | + border-radius: 0 0 4px; |
87 | 91 | }
|
88 | 92 | }
|
89 | 93 |
|
90 | 94 | @if $striped {
|
91 | 95 | tbody tr:nth-child(odd) td,
|
92 | 96 | tbody tr:nth-child(odd) th {
|
93 |
| - background-color: #f9f9f9; |
| 97 | + background-color: #F9F9F9; |
94 | 98 | }
|
95 | 99 | }
|
96 | 100 |
|
97 |
| - tbody tr:hover td, |
98 |
| - tbody tr:hover th { |
99 |
| - background-color: #f5f5f5; |
100 |
| - } |
| 101 | + tbody tr:hover td, |
| 102 | + tbody tr:hover th { |
| 103 | + background-color: #F5F5F5; |
| 104 | + } |
101 | 105 | }
|
0 commit comments