Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add .sticky-thead for sticky table headers on scroll #36125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mdo
Copy link
Member

@mdo mdo commented Apr 7, 2022

.thead-sticky {
position: sticky;
top: var(--#{$prefix}table-thead-sticky-top, 0);
z-index: $table-thead-sticky-zindex;
Copy link
Member

@louismaximepiton louismaximepiton Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We tried to add:

  > * > th {
    $border-bottom-thead: subtract(100%, ($table-border-width * 2));
    background: linear-gradient(transparent 0%, transparent $border-bottom-thead, var(--#{$prefix}table-border-color) $border-bottom-thead, var(--#{$prefix}table-border-color) 100%);
    background-color: var(--#{$prefix}table-bg);
  }

to "redraw" the separator between thead and tbody, I don't know if this could be useful here (instead of having a utility to change bg)(preview)?

@mdo mdo marked this pull request as ready for review November 14, 2022 17:29
@mdo mdo requested a review from a team as a code owner November 14, 2022 17:29
@AgentSmith0
Copy link

What speaks against merging this?

@piskesocute
Copy link

piskesocute commented Jul 15, 2024

@mdo When can this merge be approved?

@julien-deramond
Copy link
Member

Just FYI, I've rebased and resolved the conflicts for this branch so that it's ready to be reviewed.

What speaks against merging this?

When can this merge be approved?

For now, it's planned for the v5.4 as it's a new feature, and we're currently working on some patches for v5.3.x.

@leefordjudes
Copy link

Kindly add this feature, i need it for my project,
that is fixed table header and scrollable table body.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: Needs review
Status: Needs review
6 participants