sortable-lite
Version:
Simple and lightweight JavaScript module to make HTML tables sortable
48 lines (47 loc) • 957 B
CSS
.text-align-right {
text-align: right;
}
.sortable-table {
width: 30rem;
}
.sortable-table, .sortable-table th, .sortable-table td {
border: 1px solid black;
border-collapse: collapse;
}
.sortable-table thead th {
cursor: pointer;
padding: .6rem;
}
.sortable-table thead th {
position: relative;
}
.sortable-table thead th.sorted-default::after {
content: url(images/symb_default.gif);
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
display: inline-block;
}
.sortable-table thead th.sorted-asc::after {
content: url(images/symb_up.gif);
position: absolute;
right: 0;
top: 44%;
transform: translateY(-50%);
display: inline-block;
}
.sortable-table thead th.sorted-desc::after {
content: url(images/symb_down.gif);
position: absolute;
right: 0;
top: 44%;
transform: translateY(-50%);
display: inline-block;
}
.sortable-table thead tr {
background-color: #f0f0f0;
}
.sortable-table tbody td {
padding: .7rem;
}