MediaWiki:Gadget-StickyTableHeaders.css
Appearance
This page is loaded as a part of the StickyTableHeaders gadget, used by 5,507 users. |
/**
* Make thead top and tfoot bottom sticky for JS wikitables and sortable tables.
*
* Issues:
* - Broken borders. https://bugs.webkit.org/show_bug.cgi?id=128486
* - Sticky sorttop/sortbottom after sort: T355492.
* - Timeless wide tables in overflowable boxes, so not sticky.
* - Mobile tables in overflowable boxes (display:block), so not sticky.
* - Other tables in overflowable boxes not sticky without vertical scroll.
*/
@media screen {
/* Make sticky. */
.jquery-tablesorter > thead,
.mw-sticky-header > thead {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 10;
}
.jquery-tablesorter > tfoot,
.mw-sticky-header > tfoot {
bottom: 0;
position: -webkit-sticky;
position: sticky;
z-index: 10;
}
/* Adjust to other sticky elements. */
@media (min-width: 1120px) {
.skin-vector-2022.vector-sticky-header-visible .jquery-tablesorter > thead {
top: 3.125rem;
}
.skin-vector-2022.vector-sticky-header-visible [style*="overflow"] .jquery-tablesorter > thead {
top: 0;
}
.client-js.vector-sticky-header-enabled [style*="overflow"] .mw-sticky-header .mw-sticky-header-element {
top: 0 !important; /* T289817. */
}
}
@media (min-width: 851px) {
.skin-timeless .content-table-wrapper:not(.overflowed) .jquery-tablesorter > thead,
.skin-timeless .content-table-wrapper:not(.overflowed) .mw-sticky-header > thead {
top: 3.51em;
}
.skin-timeless [style*="overflow"] .content-table-wrapper:not(.overflowed) .jquery-tablesorter > thead,
.skin-timeless [style*="overflow"] .content-table-wrapper:not(.overflowed) .mw-sticky-header > thead {
top: 0;
}
}
/* Fix transparent sticky sorttop/sortbottom (after sort). */
.jquery-tablesorter > thead,
.jquery-tablesorter > tfoot {
background-color: inherit;
}
}