Last active
December 9, 2018 00:41
-
-
Save cdils/6778637 to your computer and use it in GitHub Desktop.
Bootstrap table styles (See tutorial to add Bootstrap table styles to your theme -> https://carriedils.com/add-bootstrap-table-styles-theme/)
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
<!-- | |
<thead> Groups the header content in a table | |
<th> Defines a header cell in a table | |
<tbody> Groups the body content in a table | |
<td> Defines a cell in a table | |
--> | |
<table> | |
<thead> | |
<tr> | |
<th>Column Header #1</th> | |
<th>Column Header #2</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<th>Row Header</th> | |
<td>I'm in a cell</td> | |
</tr> | |
</tbody> | |
</table> |
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
/* Pulled from https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap.css#L2079-L2241 */ | |
.table { | |
width: 100%; | |
max-width: 100%; | |
margin-bottom: 1rem; | |
} | |
.table th, | |
.table td { | |
padding: 0.75rem; | |
vertical-align: top; | |
border-top: 1px solid #eceeef; | |
} | |
.table thead th { | |
vertical-align: bottom; | |
border-bottom: 2px solid #eceeef; | |
} | |
.table tbody + tbody { | |
border-top: 2px solid #eceeef; | |
} | |
.table .table { | |
background-color: #fff; | |
} | |
.table-sm th, | |
.table-sm td { | |
padding: 0.3rem; | |
} | |
.table-bordered { | |
border: 1px solid #eceeef; | |
} | |
.table-bordered th, | |
.table-bordered td { | |
border: 1px solid #eceeef; | |
} | |
.table-bordered thead th, | |
.table-bordered thead td { | |
border-bottom-width: 2px; | |
} | |
.table-striped tbody tr:nth-of-type(odd) { | |
background-color: rgba(0, 0, 0, 0.05); | |
} | |
.table-hover tbody tr:hover { | |
background-color: rgba(0, 0, 0, 0.075); | |
} | |
.table-active, | |
.table-active > th, | |
.table-active > td { | |
background-color: rgba(0, 0, 0, 0.075); | |
} | |
.table-hover .table-active:hover { | |
background-color: rgba(0, 0, 0, 0.075); | |
} | |
.table-hover .table-active:hover > td, | |
.table-hover .table-active:hover > th { | |
background-color: rgba(0, 0, 0, 0.075); | |
} | |
.table-success, | |
.table-success > th, | |
.table-success > td { | |
background-color: #dff0d8; | |
} | |
.table-hover .table-success:hover { | |
background-color: #d0e9c6; | |
} | |
.table-hover .table-success:hover > td, | |
.table-hover .table-success:hover > th { | |
background-color: #d0e9c6; | |
} | |
.table-info, | |
.table-info > th, | |
.table-info > td { | |
background-color: #d9edf7; | |
} | |
.table-hover .table-info:hover { | |
background-color: #c4e3f3; | |
} | |
.table-hover .table-info:hover > td, | |
.table-hover .table-info:hover > th { | |
background-color: #c4e3f3; | |
} | |
.table-warning, | |
.table-warning > th, | |
.table-warning > td { | |
background-color: #fcf8e3; | |
} | |
.table-hover .table-warning:hover { | |
background-color: #faf2cc; | |
} | |
.table-hover .table-warning:hover > td, | |
.table-hover .table-warning:hover > th { | |
background-color: #faf2cc; | |
} | |
.table-danger, | |
.table-danger > th, | |
.table-danger > td { | |
background-color: #f2dede; | |
} | |
.table-hover .table-danger:hover { | |
background-color: #ebcccc; | |
} | |
.table-hover .table-danger:hover > td, | |
.table-hover .table-danger:hover > th { | |
background-color: #ebcccc; | |
} | |
.thead-inverse th { | |
color: #fff; | |
background-color: #292b2c; | |
} | |
.thead-default th { | |
color: #464a4c; | |
background-color: #eceeef; | |
} | |
.table-inverse { | |
color: #fff; | |
background-color: #292b2c; | |
} | |
.table-inverse th, | |
.table-inverse td, | |
.table-inverse thead th { | |
border-color: #fff; | |
} | |
.table-inverse.table-bordered { | |
border: 0; | |
} | |
.table-responsive { | |
display: block; | |
width: 100%; | |
overflow-x: auto; | |
-ms-overflow-style: -ms-autohiding-scrollbar; | |
} | |
.table-responsive.table-bordered { | |
border: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment