Created
July 20, 2016 08:52
-
-
Save kganser/f713317a79eba073a5314a7318dc0c5a to your computer and use it in GitHub Desktop.
Sortable json-table styles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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