Created
March 8, 2022 21:50
-
-
Save jimbobmcgee/edd734e4bfc3eb7c90ae7ef001f8b756 to your computer and use it in GitHub Desktop.
Spectre.css fixed first-column for scrollable tables
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 tbody th { | |
font-weight: 600; | |
border-bottom: 0.05rem solid rgb(218, 222, 228); | |
} | |
.table.table-scroll { | |
position: relative; | |
} | |
.table.table-scroll th:nth-child(1) { | |
position: sticky; | |
left: 0; | |
background: #fff padding-box repeat scroll 0% 0%; | |
z-index: 20; | |
} | |
.table.table-scroll.table-striped tbody tr:nth-of-type(2n+1) th:nth-child(1) { | |
background: rgb(247, 248, 249) padding-box repeat scroll 0% 0%; | |
} | |
.table.table-scroll.table-hover tbody tr:hover th:nth-child(1) { | |
background: rgb(238, 240, 243) padding-box repeat scroll 0% 0%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment