1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
|
table.dataTable {
clear: both;
margin-top: 6px !important;
margin-bottom: 6px !important;
max-width: none !important;
border-collapse: separate !important;
border-spacing: 0;
td,
th {
-webkit-box-sizing: content-box;
box-sizing: content-box;
&.dataTables_empty {
text-align: center;
}
}
// Style options for the table. Foundation provides its own, but it is also
// useful to have a few more for DataTables
&.nowrap {
th,
td {
white-space: nowrap;
}
}
}
// DataTables' built in feature elements
div.dataTables_wrapper {
div.dataTables_length {
label {
font-weight: normal;
text-align: left;
white-space: nowrap;
}
select {
width: auto;
display: inline-block;
}
}
div.dataTables_filter {
text-align: right;
label {
font-weight: normal;
white-space: nowrap;
text-align: left;
}
input {
margin-left: 0.5em;
display: inline-block;
width: auto;
}
}
div.dataTables_info {
padding-top: 0.85em;
white-space: nowrap;
}
div.dataTables_paginate {
margin: 0;
white-space: nowrap;
text-align: right;
ul.pagination {
margin: 2px 0;
white-space: nowrap;
justify-content: flex-end;
}
}
div.dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 200px;
margin-left: -100px;
margin-top: -26px;
text-align: center;
padding: 1em 0;
}
}
// Sorting - using :before and :after with UTF8 characters
table.dataTable thead {
> tr > th,
> tr > td {
&.sorting_asc,
&.sorting_desc,
&.sorting {
padding-right: 30px;
}
&:active {
outline: none;
}
}
.sorting,
.sorting_asc,
.sorting_desc,
.sorting_asc_disabled,
.sorting_desc_disabled {
cursor: pointer;
position: relative;
&:before,
&:after {
position: absolute;
bottom: 0.9em;
display: block;
opacity: 0.3;
}
&:before {
right: 1em;
content: "\2191"; // up arrow - ascending
}
&:after {
right: 0.5em;
content: "\2193"; // down arrow - descending
}
}
.sorting_asc:before,
.sorting_desc:after {
opacity: 1;
}
.sorting_asc_disabled:before,
.sorting_desc_disabled:after {
opacity: 0;
}
}
// Scrolling
div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important;
}
div.dataTables_scrollBody {
table {
border-top: none;
margin-top: 0 !important;
margin-bottom: 0 !important;
thead { // Hide sort icons
.sorting:before,
.sorting_asc:before,
.sorting_desc:before,
.sorting:after,
.sorting_asc:after,
.sorting_desc:after {
display: none;
}
}
tbody tr:first-child th,
tbody tr:first-child td {
border-top: none;
}
}
}
div.dataTables_scrollFoot {
> .dataTables_scrollFootInner {
box-sizing: content-box;
> table {
margin-top: 0 !important;
border-top: none;
}
}
}
// Responsive
@media screen and (max-width: 767px) {
div.dataTables_wrapper {
div.dataTables_length,
div.dataTables_filter,
div.dataTables_info,
div.dataTables_paginate {
text-align: center;
}
div.dataTables_paginate ul.pagination {
justify-content: center !important;
}
}
}
//
// Bootstrap provides a range of styling options for table's via class name
// that we want to full support. They sometimes require some customisations
//
// Condensed
table.dataTable.table-sm {
> thead > tr > th :not(.sorting_disabled){
padding-right: 20px;
}
.sorting,
.sorting_asc,
.sorting_desc {
&:before {
top: 5px;
right: 0.85em;
}
&:after {
top: 5px;
}
}
}
// Frustratingly the border-collapse:collapse used by Bootstrap makes the column
// width calculations when using scrolling impossible to align columns. We have
// to use `border-collapse: separate`
table.table-bordered.dataTable {
border-right-width: 0;
th,
td {
border-left-width: 0;
&:last-child,
&:last-child {
border-right-width: 1px;
}
}
tbody th,
tbody td {
border-bottom-width: 0;
}
}
// Bordered table
div.dataTables_scrollHead table.table-bordered {
border-bottom-width: 0;
}
// Responsive tables. We use rows inside the Bootstrap responsive wrapper,
// so they need to have their margin and padding removed
div.table-responsive > div.dataTables_wrapper > div.row {
margin: 0;
> div[class^="col-"] {
&:first-child {
padding-left: 0;
}
&:last-child {
padding-right: 0;
}
}
}
|