Skip to content

Instantly share code, notes, and snippets.

@kganser
Created July 20, 2016 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kganser/f713317a79eba073a5314a7318dc0c5a to your computer and use it in GitHub Desktop.
Save kganser/f713317a79eba073a5314a7318dc0c5a to your computer and use it in GitHub Desktop.
Sortable json-table styles
table {
font-size: 13px;
border-collapse: separate;
border-spacing: 0;
border: 1px solid #777;
position: relative;
}
th {
font-weight: normal;
text-align: left;
background-image: linear-gradient(white 50%, #ddd);
cursor: pointer;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
}
th.asc:after,
th.desc:after {
content: "";
display: block;
height: 0;
width: 0;
float: right;
border: solid 5px transparent;
border-bottom: solid 5px #333;
border-top: none;
margin: 5px 0 0 5px;
}
th.desc:after {
border-bottom: none;
border-top: solid 5px #333;
}
th, td {
padding: 3px 5px;
border-style: solid;
border-color: #ddd;
border-width: 0 1px 1px 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment