Skip to content

Commit

Permalink
Fixed transparent table headers
Browse files Browse the repository at this point in the history
  • Loading branch information
bulhakovolexii committed Feb 1, 2024
1 parent 634d85a commit de3db48
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions docs/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ h4,
}

// Styling tables
.table-wrapper {
overflow-x: unset;
box-shadow: none;
}

table {
outline: $border $table-background-color;
outline-offset: -3px;
border-radius: $border-radius;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08);
}

th,
td {
min-width: 1rem;
Expand All @@ -45,22 +57,6 @@ td {
}
}

.table-wrapper {
max-width: 1200px;
margin: 0 auto;
overflow-x: unset;
}

thead {
position: sticky;
top: 0;
z-index: 1;
& th {
box-shadow: 0px -2px $body-background-color, 2px 0px $body-background-color,
2px -2px $body-background-color;
}
}

tbody {
tr {
&:last-of-type {
Expand All @@ -71,3 +67,15 @@ tbody {
}
}
}

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

0 comments on commit de3db48

Please sign in to comment.