Skip to content

Commit

Permalink
Added "sticky" table headers
Browse files Browse the repository at this point in the history
  • Loading branch information
bulhakovolexii committed Jan 31, 2024
1 parent a178ce4 commit 6dbce30
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions docs/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ h4,
margin: 0 auto;
}

th,
td {
&:first-of-type {
border-left: $border $border-color;
}
}

table {
outline: $border $body-background-color;
outline-offset: -3px;
}

// Showing light and dark theme images separately
@media (prefers-color-scheme: light) {
img[src$="gh-dark-mode-only"] {
Expand All @@ -51,8 +39,26 @@ table {
th,
td {
min-width: 1rem;

&:first-of-type {
border-left: $border $border-color;
}
}
.table-wrapper {
max-width: 1200px;
margin: 0 auto;
overflow-x: unset;
outline: $border $body-background-color;
outline-offset: -3px;
}

thead {
position: sticky;
top: 0;
z-index: 1;
outline: $border $body-background-color;
outline-offset: -1px;
& th {
border-bottom-width: 2px;
}
}

0 comments on commit 6dbce30

Please sign in to comment.