Skip to content

Commit

Permalink
fix(table): change thead to sticky position with z-index (carbon-desi…
Browse files Browse the repository at this point in the history
…gn-system#5887)

* fix(table): change thead to sticky position with z-index

This change makes `thead` stick to the top of the table container and ensures the elements in `thead` are visible as the table body is scrolled.

* fix(data-table): remove padding as we switch to sticky position

Co-authored-by: TJ Egan <tw15egan@gmail.com>
  • Loading branch information
2 people authored and joshblack committed Apr 23, 2020
1 parent 3c72a50 commit 5f5bf61
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@
// -------------
.#{$prefix}--data-table_inner-container {
background-color: $ui-03;
padding-top: rem(48px);
transform: translateZ(0);
}

Expand All @@ -492,7 +491,8 @@
}

thead {
position: fixed;
position: sticky;
z-index: 1;
top: 0;
width: 100%;
overflow: scroll;
Expand Down

0 comments on commit 5f5bf61

Please sign in to comment.